Add USB Hub support

daktil_thumb_popravljen
Jun Wako 2014-12-10 23:52:38 +09:00
parent 0a181c7eb5
commit c9674d388d
2 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,7 @@
#include "hid.h" #include "hid.h"
#include "hidboot.h" #include "hidboot.h"
#include "parser.h" #include "parser.h"
#include "usbhub.h"
// LUFA // LUFA
#include "lufa.h" #include "lufa.h"
@ -23,6 +24,15 @@
static USB usb_host; static USB usb_host;
static HIDBoot<HID_PROTOCOL_KEYBOARD> kbd(&usb_host); static HIDBoot<HID_PROTOCOL_KEYBOARD> kbd(&usb_host);
static KBDReportParser kbd_parser; 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) static void LUFA_setup(void)
{ {

View File

@ -8,6 +8,7 @@ USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0
USB_HOST_SHIELD_SRC = \ USB_HOST_SHIELD_SRC = \
$(USB_HOST_SHIELD_DIR)/Usb.cpp \ $(USB_HOST_SHIELD_DIR)/Usb.cpp \
$(USB_HOST_SHIELD_DIR)/hid.cpp \ $(USB_HOST_SHIELD_DIR)/hid.cpp \
$(USB_HOST_SHIELD_DIR)/usbhub.cpp \
$(USB_HOST_SHIELD_DIR)/parsetools.cpp \ $(USB_HOST_SHIELD_DIR)/parsetools.cpp \
$(USB_HOST_SHIELD_DIR)/message.cpp $(USB_HOST_SHIELD_DIR)/message.cpp