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