]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
usb_usb: usb_hid: Change for USB_Host_Shield_2.0
authortmk <hasu@tmk-kbd.com>
Tue, 30 Oct 2018 06:50:51 +0000 (15:50 +0900)
committertmk <hasu@tmk-kbd.com>
Wed, 31 Oct 2018 00:35:30 +0000 (09:35 +0900)
converter/usb_usb/usb_usb.cpp
tmk_core/protocol/usb_hid.mk
tmk_core/protocol/usb_hid/parser.cpp
tmk_core/protocol/usb_hid/parser.h

index 4676584515e3bacf41a876fab432c1173f1ca9a2..086c90aed562b6b420f243a66e84af0d9e6a6c2e 100644 (file)
@@ -21,7 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // 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<HID_PROTOCOL_KEYBOARD>    kbd1(&usb_host);
-HIDBoot<HID_PROTOCOL_KEYBOARD>    kbd2(&usb_host);
-HIDBoot<HID_PROTOCOL_KEYBOARD>    kbd3(&usb_host);
-HIDBoot<HID_PROTOCOL_KEYBOARD>    kbd4(&usb_host);
+HIDBoot<USB_HID_PROTOCOL_KEYBOARD>    kbd1(&usb_host);
+HIDBoot<USB_HID_PROTOCOL_KEYBOARD>    kbd2(&usb_host);
+HIDBoot<USB_HID_PROTOCOL_KEYBOARD>    kbd3(&usb_host);
+HIDBoot<USB_HID_PROTOCOL_KEYBOARD>    kbd4(&usb_host);
 KBDReportParser kbd_parser1;
 KBDReportParser kbd_parser2;
 KBDReportParser kbd_parser3;
index 1f79bda3bd64d3b95ec4d0aa9928ec50fdfbec1f..495c4beebd1d0cf5efb7dd686dd463d2d1e0d6c8 100644 (file)
@@ -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 
index 730a20d792dc741aedf172a0497a5e5152caf481..81a5bfa6515d6cda19f2b93adfc16e142ea246d4 100644 (file)
@@ -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++) {
index 036281fa661342b43fa89a6fe1a7440072a7f8e4..24cad551d7f7b2e5952d83e60102fef1b402c9c5 100644 (file)
@@ -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