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.md 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. TMK Keyboard Firmware Core Library
  2. ==================================
  3. This is a keyboard firmware library with some useful features for Atmel AVR and Cortex-M.
  4. Source code is available here: <https://github.com/tmk/tmk_keyboard/tree/core>
  5. Updates
  6. -------
  7. #### 2016/06/26
  8. Keymap framework was updated. `fn_actions[]` should be defined as `action_t` instead of `uint16_t`. And default code for keymap handling is now included in core you just need define `uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]` and `action_t fn_actions[]`.
  9. #### 2016/02/10
  10. flabbergast's Chibios protocol was merged from <https://github.com/flabbergast/tmk_keyboard/tree/chibios>. See [protocol/chibios/README.md](protocol/chibios/README.md). Chibios protocol supports Cortex-M such as STM32 and Kinetis.
  11. #### 2015/04/22
  12. separated with TMK Keyboard Firmware Collection
  13. Features
  14. --------
  15. These features can be used in your keyboard.
  16. * Multi-layer Keymap - Multiple keyboard layouts with layer switching
  17. * Mouse key - Mouse control with keyboard
  18. * System Control Key - Power Down, Sleep, Wake Up and USB Remote Wake up
  19. * Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
  20. * USB NKRO - 120 keys(+ 8 modifiers) simultaneously
  21. * PS/2 mouse support - PS/2 mouse(TrackPoint) as composite device
  22. * Keyboard protocols - PS/2, ADB, M0110, Sun and other old keyboard protocols
  23. * User Function - Customizable function of key with writing code
  24. * Macro - Very primitive at this time
  25. * Keyboard Tricks - Oneshot modifier and modifier with tapping feature
  26. * Debug Console - Messages for debug and interaction with firmware
  27. * Virtual DIP Switch - Configurations stored EEPROM(Boot Magic)
  28. * Locking CapsLock - Mechanical switch support for CapsLock
  29. * Breathing Sleep LED - Sleep indicator with charm during USB suspend
  30. * Backlight - Control backlight levels
  31. TMK Keyboard Firmware Collection
  32. --------------------------------
  33. Complete firmwares for various keyboards and protocol converters.
  34. <https://github.com/tmk/tmk_keyboard>
  35. License
  36. -------
  37. **GPLv2** or later. Some protocol files are under **Modified BSD License**.
  38. LUFA, PJRC and V-USB stack have their own license respectively.
  39. Build Firmware and Program Controller
  40. -------------------------------------
  41. See [doc/build.md](doc/build.md).
  42. Start Your Own Project
  43. -----------------------
  44. **TBD**
  45. ### Config.h Options
  46. #### 1. USB vendor/product ID and device description
  47. #define VENDOR_ID 0xFEED
  48. #define PRODUCT_ID 0xBEEF
  49. #define MANUFACTURER t.m.k.
  50. #define PRODUCT Macway mod
  51. #define DESCRIPTION t.m.k. keyboard firmware for Macway mod
  52. #### 2. Keyboard matrix configuration
  53. #define MATRIX_ROWS 8
  54. #define MATRIX_COLS 8
  55. #define MATRIX_HAS_GHOST
  56. Architecture
  57. ------------
  58. Architecture Diagram
  59. +---------------+---------------+-------------+
  60. | Host | Keyboard | Matrix, LED |
  61. ___________ |-----------+-+ +-------------+ | +-----------|
  62. / /| Keys/Mouse | Protocol |d| | Action | | | Protocol |
  63. /__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix |
  64. |.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________
  65. || || |----------->| PJRC |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /|
  66. || Host || | Console | iWRAP(BT)|e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / /
  67. ||________||/.<-----------| UART |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / /
  68. `_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ /
  69. |_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/
  70. +---------------------------------------------+ Keyboard
  71. Debugging
  72. --------
  73. Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
  74. You can use xprintf() to display debug info on `hid_listen`, see `common/xprintf.h`.
  75. Files and Directories
  76. -------------------
  77. ### Top
  78. * common/ - common codes
  79. * protocol/ - keyboard protocol support
  80. * doc/ - documents
  81. * common.mk - Makefile for common
  82. * protocol.mk - Makefile for protocol
  83. * rules.mk - Makefile for build rules
  84. ### Common
  85. * host.h
  86. * host_driver.h
  87. * keyboard.h
  88. * command.h
  89. * keymap.h
  90. * action.h
  91. * keycode.h
  92. * matrix.h
  93. * led.h
  94. * mousekey.h
  95. * report.h
  96. * debug.h
  97. * print.h
  98. * bootloader.h
  99. * sendchar.h
  100. * timer.h
  101. * util.h
  102. ### Keyboard Protocols
  103. * lufa/ - LUFA USB stack
  104. * pjrc/ - PJRC USB stack
  105. * vusb/ - Objective Development V-USB
  106. * iwrap/ - Bluetooth HID for Bluegiga iWRAP
  107. * ps2.c - PS/2 protocol
  108. * adb.c - Apple Desktop Bus protocol
  109. * m0110.c - Macintosh 128K/512K/Plus keyboard protocol
  110. * news.c - Sony NEWS keyboard protocol
  111. * x68k.c - Sharp X68000 keyboard protocol
  112. * serial_soft.c - Asynchronous Serial protocol implemented by software
  113. Coding Style
  114. -------------
  115. - Doesn't use Tab to indent, use 4-spaces instead.