aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/keyboard.c')
-rw-r--r--tmk_core/common/keyboard.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 001fb00ce..4eff764e2 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -117,19 +117,35 @@ static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata)
117 117
118#endif 118#endif
119 119
120/** \brief matrix_setup
121 *
122 * FIXME: needs doc
123 */
120__attribute__ ((weak)) 124__attribute__ ((weak))
121void matrix_setup(void) { 125void matrix_setup(void) {
122} 126}
123 127
128/** \brief keyboard_setup
129 *
130 * FIXME: needs doc
131 */
124void keyboard_setup(void) { 132void keyboard_setup(void) {
125 matrix_setup(); 133 matrix_setup();
126} 134}
127 135
136/** \brief is_keyboard_master
137 *
138 * FIXME: needs doc
139 */
128__attribute__((weak)) 140__attribute__((weak))
129bool is_keyboard_master(void) { 141bool is_keyboard_master(void) {
130 return true; 142 return true;
131} 143}
132 144
145/** \brief keyboard_init
146 *
147 * FIXME: needs doc
148 */
133void keyboard_init(void) { 149void keyboard_init(void) {
134 timer_init(); 150 timer_init();
135 matrix_init(); 151 matrix_init();
@@ -167,8 +183,16 @@ void keyboard_init(void) {
167#endif 183#endif
168} 184}
169 185
170/* 186/** \brief Keyboard task: Do keyboard routine jobs
171 * Do keyboard routine jobs: scan matrix, light LEDs, ... 187 *
188 * Do routine keyboard jobs:
189 *
190 * * scan matrix
191 * * handle mouse movements
192 * * run visualizer code
193 * * handle midi commands
194 * * light LEDs
195 *
172 * This is repeatedly called as fast as possible. 196 * This is repeatedly called as fast as possible.
173 */ 197 */
174void keyboard_task(void) 198void keyboard_task(void)
@@ -274,6 +298,10 @@ MATRIX_LOOP_END:
274 } 298 }
275} 299}
276 300
301/** \brief keyboard set leds
302 *
303 * FIXME: needs doc
304 */
277void keyboard_set_leds(uint8_t leds) 305void keyboard_set_leds(uint8_t leds)
278{ 306{
279 if (debug_keyboard) { debug("keyboard_set_led: "); debug_hex8(leds); debug("\n"); } 307 if (debug_keyboard) { debug("keyboard_set_led: "); debug_hex8(leds); debug("\n"); }