diff options
| author | Jun Wako <wakojun@gmail.com> | 2014-12-10 23:52:38 +0900 |
|---|---|---|
| committer | Jun Wako <wakojun@gmail.com> | 2014-12-10 23:52:38 +0900 |
| commit | c9674d388d3b018cb1dfc0a34868642be53e913c (patch) | |
| tree | f0eee87adea47bf2ed5d5554f54f1e7aca40f544 | |
| parent | 0a181c7eb58b79405ee91e7fca9f827678424872 (diff) | |
| download | qmk_firmware-c9674d388d3b018cb1dfc0a34868642be53e913c.tar.gz qmk_firmware-c9674d388d3b018cb1dfc0a34868642be53e913c.zip | |
Add USB Hub support
| -rw-r--r-- | converter/usb_usb/main.cpp | 10 | ||||
| -rw-r--r-- | protocol/usb_hid.mk | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/converter/usb_usb/main.cpp b/converter/usb_usb/main.cpp index 4e655632e..0b536b05a 100644 --- a/converter/usb_usb/main.cpp +++ b/converter/usb_usb/main.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include "hid.h" | 8 | #include "hid.h" |
| 9 | #include "hidboot.h" | 9 | #include "hidboot.h" |
| 10 | #include "parser.h" | 10 | #include "parser.h" |
| 11 | #include "usbhub.h" | ||
| 11 | 12 | ||
| 12 | // LUFA | 13 | // LUFA |
| 13 | #include "lufa.h" | 14 | #include "lufa.h" |
| @@ -23,6 +24,15 @@ | |||
| 23 | static USB usb_host; | 24 | static USB usb_host; |
| 24 | static HIDBoot<HID_PROTOCOL_KEYBOARD> kbd(&usb_host); | 25 | static HIDBoot<HID_PROTOCOL_KEYBOARD> kbd(&usb_host); |
| 25 | static KBDReportParser kbd_parser; | 26 | static KBDReportParser kbd_parser; |
| 27 | static USBHub hub1(&usb_host); // one hub is enough for HHKB pro2 | ||
| 28 | /* may be needed for other device with more hub | ||
| 29 | static USBHub hub2(&usb_host); | ||
| 30 | static USBHub hub3(&usb_host); | ||
| 31 | static USBHub hub4(&usb_host); | ||
| 32 | static USBHub hub5(&usb_host); | ||
| 33 | static USBHub hub6(&usb_host); | ||
| 34 | static USBHub hub7(&usb_host); | ||
| 35 | */ | ||
| 26 | 36 | ||
| 27 | static void LUFA_setup(void) | 37 | static void LUFA_setup(void) |
| 28 | { | 38 | { |
diff --git a/protocol/usb_hid.mk b/protocol/usb_hid.mk index 6914dce80..8fda76c2e 100644 --- a/protocol/usb_hid.mk +++ b/protocol/usb_hid.mk | |||
| @@ -8,6 +8,7 @@ USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0 | |||
| 8 | USB_HOST_SHIELD_SRC = \ | 8 | USB_HOST_SHIELD_SRC = \ |
| 9 | $(USB_HOST_SHIELD_DIR)/Usb.cpp \ | 9 | $(USB_HOST_SHIELD_DIR)/Usb.cpp \ |
| 10 | $(USB_HOST_SHIELD_DIR)/hid.cpp \ | 10 | $(USB_HOST_SHIELD_DIR)/hid.cpp \ |
| 11 | $(USB_HOST_SHIELD_DIR)/usbhub.cpp \ | ||
| 11 | $(USB_HOST_SHIELD_DIR)/parsetools.cpp \ | 12 | $(USB_HOST_SHIELD_DIR)/parsetools.cpp \ |
| 12 | $(USB_HOST_SHIELD_DIR)/message.cpp | 13 | $(USB_HOST_SHIELD_DIR)/message.cpp |
| 13 | 14 | ||
