summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Wako <wakojun@gmail.com>2014-12-10 23:52:38 +0900
committerJun Wako <wakojun@gmail.com>2014-12-10 23:52:38 +0900
commitc9674d388d3b018cb1dfc0a34868642be53e913c (patch)
treef0eee87adea47bf2ed5d5554f54f1e7aca40f544
parent0a181c7eb58b79405ee91e7fca9f827678424872 (diff)
Add USB Hub support
-rw-r--r--converter/usb_usb/main.cpp10
-rw-r--r--protocol/usb_hid.mk1
2 files changed, 11 insertions, 0 deletions
diff --git a/converter/usb_usb/main.cpp b/converter/usb_usb/main.cpp
index 4e655632e3..0b536b05aa 100644
--- a/converter/usb_usb/main.cpp
+++ b/converter/usb_usb/main.cpp
@@ -8,6 +8,7 @@
#include "hid.h"
#include "hidboot.h"
#include "parser.h"
+#include "usbhub.h"
// LUFA
#include "lufa.h"
@@ -23,6 +24,15 @@
static USB usb_host;
static HIDBoot<HID_PROTOCOL_KEYBOARD> kbd(&usb_host);
static KBDReportParser kbd_parser;
+static USBHub hub1(&usb_host); // one hub is enough for HHKB pro2
+/* may be needed for other device with more hub
+static USBHub hub2(&usb_host);
+static USBHub hub3(&usb_host);
+static USBHub hub4(&usb_host);
+static USBHub hub5(&usb_host);
+static USBHub hub6(&usb_host);
+static USBHub hub7(&usb_host);
+*/
static void LUFA_setup(void)
{
diff --git a/protocol/usb_hid.mk b/protocol/usb_hid.mk
index 6914dce809..8fda76c2e5 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
USB_HOST_SHIELD_SRC = \
$(USB_HOST_SHIELD_DIR)/Usb.cpp \
$(USB_HOST_SHIELD_DIR)/hid.cpp \
+ $(USB_HOST_SHIELD_DIR)/usbhub.cpp \
$(USB_HOST_SHIELD_DIR)/parsetools.cpp \
$(USB_HOST_SHIELD_DIR)/message.cpp