Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README 4.4KB

13 years ago
13 years ago
13 years ago
13 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. t.m.k. Keyboard Firmware
  2. ========================
  3. This is keyboard firmware for Teensy(AVR USB MCU) and V-USB board.
  4. source code repository:
  5. http://github.com/tmk/tmk_keyboard
  6. This firmware is used in following projects:
  7. HHKB mod: http://geekhack.org/showwiki.php?title=Island:12047
  8. Macway mod: http://geekhack.org/showwiki.php?title=Island:11930
  9. PS2 to USB: http://geekhack.org/showwiki.php?title=Island:14618
  10. ADB to USB: http://geekhack.org/showwiki.php?title=Island:14290
  11. The project is heavily based on PJRC USB Keyboard/Mouse Example and
  12. owes a debt to preceding keyboard firmware projects.
  13. http://www.pjrc.com/teensy
  14. Features
  15. --------
  16. Mouse key
  17. control mouse cursor from keyboard.
  18. System Control Key
  19. Power Down, Sleep, Wake Up & USB Remote Wake up
  20. Media Control Key
  21. Volume Down/Up, Mute
  22. USB NKRO
  23. send 120 keys(+ 8 modifiers) at most simultaneously.
  24. PS/2 mouse support
  25. integrate PS/2 mouse(TrackPoint) into keyboard as composite device.
  26. Limitations
  27. -----------
  28. Files & Directories
  29. -------------------
  30. Target:
  31. hhkb/ keyboard controller for PFU HHKB pro
  32. macway/ keyboard controller for Macway mod
  33. ps2_usb/ PS2 to USB keyboard converter
  34. adb_usb/ ADB to USB keyboard converter
  35. USB Protocol Stack:
  36. pjrc/ PJRC USB stack
  37. vusb/ V-USB USB stack
  38. ps2.[ch] PS/2 protocol
  39. adb.[ch] ADB protocol
  40. Build
  41. -----
  42. To compile needs AVR GCC, AVR Libc and GNU make.
  43. You can use WinAVR on Windows. http://winavr.sourceforge.net/
  44. $ cd <target>
  45. $ make
  46. The firmware will be compiled as a file tmk_<target>.hex.
  47. Build your own firmware
  48. -----------------------
  49. Copying exsistent target(macway) is easy way.
  50. 1. Copy contens of macway/ to your own target directory.
  51. 2. Edit Makefile. See next section.
  52. 3. Edit config.h. See next section.
  53. 4. Edit matrix.c. You will need to fix followings at least.
  54. matrix_init()
  55. matrix_scan()
  56. read_col()
  57. unselect_rows()
  58. select_row()
  59. 5. Edit keymap.c. NOTE: It is not final design and a bit messy.
  60. You will need to fix followings at least.
  61. KEYMAP
  62. fn_layer[]
  63. fn_keycode[]
  64. keymaps[]
  65. 6. Build.
  66. If you have a build error like following, comment out "--relax" option in Makefile.common.
  67. (.vectors+0x30): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_12'
  68. Build Options
  69. -------------
  70. <target>/Makefile:
  71. 1. Set target name for your firmware.
  72. TARGET = tmk_<target>
  73. 2. Choose a MCU and its frequency.
  74. MCU = atmega32u4 # Teensy 2.0
  75. #MCU = at90usb1286 # Teensy++ 2.0
  76. F_CPU = 16000000
  77. 3. Choose optional modules as needed. Comment out to disable optional modules.
  78. MOUSEKEY_ENABLE = yes # Mouse keys
  79. PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
  80. EXTRAKEY_ENABLE = yes # Enhanced feature for Windows(Audio control and System control)
  81. NKRO_ENABLE = yes # USB Nkey Rollover
  82. <target>/config.h:
  83. 1. USB vendor/product ID and device description
  84. #define VENDOR_ID 0xFEED
  85. #define PRODUCT_ID 0xBEEF
  86. /* device description */
  87. #define MANUFACTURER t.m.k.
  88. #define PRODUCT Macway mod
  89. #define DESCRIPTION t.m.k. keyboard firmware for Macway mod
  90. 2. Keyboard matrix configuration
  91. #define MATRIX_ROWS 8
  92. #define MATRIX_COLS 8
  93. #define MATRIX_HAS_GHOST
  94. 3. Mouse keys configuration if needed.
  95. 4. PS/2 mouse configuration if needed.
  96. Debuging & Rescue
  97. -----------------
  98. Use PJRC's hid_listen.exe to see debug messages.
  99. Press <COMMAND> + H to debug menu.
  100. (see config.h for <COMMAND> key combination.)
  101. Pressing any 3 keys when connected enables debug output.
  102. Pressing any 4 keys when connected makes bootloader comes up.
  103. Projects related
  104. ----------------
  105. PJRC USB Keyboard/Mouse Example
  106. http://www.pjrc.com/teensy/usb_keyboard.html
  107. http://www.pjrc.com/teensy/usb_mouse.html
  108. kbupgrade
  109. http://github.com/rhomann/kbupgrade
  110. http://geekhack.org/showwiki.php?title=Island:8406
  111. c64key
  112. http://symlink.dk/projects/c64key/
  113. rump
  114. http://mg8.org/rump/
  115. http://github.com/clee/rump
  116. dulcimer
  117. http://www.schatenseite.de/dulcimer.html
  118. humblehacker-keyboard
  119. http://github.com/humblehacker
  120. http://www.humblehacker.com/keyboard/
  121. http://geekhack.org/showwiki.php?title=Island:6292
  122. ps2avr
  123. http://sourceforge.net/projects/ps2avr/
  124. EOF