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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

README.md 4.9KB

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