diff options
author | Jun Wako <wakojun@gmail.com> | 2014-12-11 01:00:32 +0900 |
---|---|---|
committer | Jun Wako <wakojun@gmail.com> | 2014-12-11 01:00:32 +0900 |
commit | b47450da9ffc1c296b3ba6ecd189fced0b7b8ed9 (patch) | |
tree | 75f6876b9fa3baedb4970c44bed726168bf7c149 /converter | |
parent | f6f698dda0a1cc9e92b75927b0273205402de9e2 (diff) | |
parent | 30864ea5e48c15796cc2e3e2ba4a9b50322d82a4 (diff) |
Merge branch 'usb_usb_hub'
Diffstat (limited to 'converter')
-rw-r--r-- | converter/usb_usb/Makefile | 2 | ||||
-rw-r--r-- | converter/usb_usb/README | 35 | ||||
-rw-r--r-- | converter/usb_usb/config.h | 2 | ||||
-rw-r--r-- | converter/usb_usb/main.cpp | 14 |
4 files changed, 48 insertions, 5 deletions
diff --git a/converter/usb_usb/Makefile b/converter/usb_usb/Makefile index 13f77ca9b7..4f983e7f68 100644 --- a/converter/usb_usb/Makefile +++ b/converter/usb_usb/Makefile @@ -120,7 +120,7 @@ VPATH += $(TOP_DIR) # program Leonardo -PROGRAM_CMD = avrdude -p$(MCU) -cavr109 -P$(DEV) -b57600 -Uflash:w:$(TARGET).hex +PROGRAM_CMD = avrdude -p$(MCU) -cavr109 -b57600 -Uflash:w:$(TARGET).hex -P$(DEV) diff --git a/converter/usb_usb/README b/converter/usb_usb/README index a489371107..69caabb278 100644 --- a/converter/usb_usb/README +++ b/converter/usb_usb/README @@ -19,13 +19,42 @@ Build firmware $ cd converter/usb_usb $ make -You will get usb_usb.hex if you are lucky. -Program your Leonardo with avrdude(or easy-going Arduino IDE): +Program converter. Push reset button on Leonardo before run this command. Serial port name(COM17) depends your system. On Linux I got /dev/ttyACM0. + + $ DEV=COM17 make program + or + $ avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:usb_usb.hex -PCOM17 - $ avrdude -patmega32u4 -cavr109 -PCOM17 -b57600 -Uflash:w:usb_usb.hex Limitation ---------- Only supports 'HID Boot protocol'. Not support keyboard LED yet. + + + +Update +------ +2014/12/11 Added Hub support(confirmed with HHKB pro2) + + + +Resource +-------- +USB Host Sheild 2.0 + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini +USB Host Sheild 2.0 source + https://github.com/felis/USB_Host_Shield_2.0 +Arduino USB Host Shield(with bootst converter) + http://arduino.cc/en/Main/ArduinoUSBHostShield +Arduino source + https://github.com/arduino/Arduino/hardware/arduino/{cores,variants} +Initial release of TMK USB-USB converter + https://geekhack.org/index.php?topic=33057.msg653549#msg653549 + http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854 +Arduino-based hardware keyboard remapper - Colemak forum + http://forum.colemak.com/viewtopic.php?id=1561 +Teensy + Host Shield + http://www.pjrc.com/teensy/td_libs_USBHostShield.html diff --git a/converter/usb_usb/config.h b/converter/usb_usb/config.h index d614973f7e..bdc02868c8 100644 --- a/converter/usb_usb/config.h +++ b/converter/usb_usb/config.h @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xCAFE +#define PRODUCT_ID 0x005B #define DEVICE_VER 0x0814 #define MANUFACTURER t.m.k. #define PRODUCT USB to USB keyboard converter diff --git a/converter/usb_usb/main.cpp b/converter/usb_usb/main.cpp index 20b7af66a2..30fd3348a3 100644 --- a/converter/usb_usb/main.cpp +++ b/converter/usb_usb/main.cpp @@ -8,11 +8,13 @@ #include "hid.h" #include "hidboot.h" #include "parser.h" +#include "usbhub.h" // LUFA #include "lufa.h" #include "timer.h" +#include "sendchar.h" #include "debug.h" #include "keyboard.h" @@ -22,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) { @@ -39,6 +50,7 @@ static void LUFA_setup(void) // for Console_Task USB_Device_EnableSOFEvents(); + print_set_sendchar(sendchar); } static void HID_setup() @@ -60,9 +72,11 @@ int main(void) LED_TX_ON; debug_enable = true; +/* debug_matrix = true; debug_keyboard = true; debug_mouse = true; +*/ host_set_driver(&lufa_driver); keyboard_init(); |