From: tmk Date: Tue, 30 Oct 2018 06:50:51 +0000 (+0900) Subject: usb_usb: usb_hid: Change for USB_Host_Shield_2.0 X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=a0b5bf4b67b3cf406f57d52f8a7039ca7eda5a9b;p=max%2Ftmk_keyboard.git usb_usb: usb_hid: Change for USB_Host_Shield_2.0 --- diff --git a/converter/usb_usb/usb_usb.cpp b/converter/usb_usb/usb_usb.cpp index 46765845..086c90ae 100644 --- a/converter/usb_usb/usb_usb.cpp +++ b/converter/usb_usb/usb_usb.cpp @@ -21,7 +21,7 @@ along with this program. If not, see . // USB HID host #include "Usb.h" #include "usbhub.h" -#include "hid.h" +#include "usbhid.h" #include "hidboot.h" #include "parser.h" @@ -73,10 +73,10 @@ static bool matrix_is_mod =false; USB usb_host; USBHub hub1(&usb_host); USBHub hub2(&usb_host); -HIDBoot kbd1(&usb_host); -HIDBoot kbd2(&usb_host); -HIDBoot kbd3(&usb_host); -HIDBoot kbd4(&usb_host); +HIDBoot kbd1(&usb_host); +HIDBoot kbd2(&usb_host); +HIDBoot kbd3(&usb_host); +HIDBoot kbd4(&usb_host); KBDReportParser kbd_parser1; KBDReportParser kbd_parser2; KBDReportParser kbd_parser3; diff --git a/tmk_core/protocol/usb_hid.mk b/tmk_core/protocol/usb_hid.mk index 1f79bda3..495c4bee 100644 --- a/tmk_core/protocol/usb_hid.mk +++ b/tmk_core/protocol/usb_hid.mk @@ -4,10 +4,10 @@ USB_HID_DIR = protocol/usb_hid # # USB Host Shield # -USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0 +USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0-git USB_HOST_SHIELD_SRC = \ $(USB_HOST_SHIELD_DIR)/Usb.cpp \ - $(USB_HOST_SHIELD_DIR)/hid.cpp \ + $(USB_HOST_SHIELD_DIR)/usbhid.cpp \ $(USB_HOST_SHIELD_DIR)/usbhub.cpp \ $(USB_HOST_SHIELD_DIR)/parsetools.cpp \ $(USB_HOST_SHIELD_DIR)/message.cpp diff --git a/tmk_core/protocol/usb_hid/parser.cpp b/tmk_core/protocol/usb_hid/parser.cpp index 730a20d7..81a5bfa6 100644 --- a/tmk_core/protocol/usb_hid/parser.cpp +++ b/tmk_core/protocol/usb_hid/parser.cpp @@ -4,7 +4,7 @@ #include "debug.h" -void KBDReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) +void KBDReportParser::Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) { dprintf("input %d:", hid->GetAddress()); for (uint8_t i = 0; i < len; i++) { diff --git a/tmk_core/protocol/usb_hid/parser.h b/tmk_core/protocol/usb_hid/parser.h index 036281fa..24cad551 100644 --- a/tmk_core/protocol/usb_hid/parser.h +++ b/tmk_core/protocol/usb_hid/parser.h @@ -1,7 +1,7 @@ #ifndef PARSER_H #define PARSER_H -#include "hid.h" +#include "usbhid.h" #include "report.h" class KBDReportParser : public HIDReportParser @@ -9,7 +9,7 @@ class KBDReportParser : public HIDReportParser public: report_keyboard_t report; uint16_t time_stamp; - virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); + virtual void Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); }; #endif