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.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 6f659b244..15652276b 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -139,6 +139,40 @@ __attribute__ ((weak))
139void matrix_setup(void) { 139void matrix_setup(void) {
140} 140}
141 141
142/** \brief keyboard_pre_init_user
143 *
144 * FIXME: needs doc
145 */
146__attribute__ ((weak))
147void keyboard_pre_init_user(void) { }
148
149/** \brief keyboard_pre_init_kb
150 *
151 * FIXME: needs doc
152 */
153__attribute__ ((weak))
154void keyboard_pre_init_kb(void) {
155 keyboard_pre_init_user();
156}
157
158/** \brief keyboard_post_init_user
159 *
160 * FIXME: needs doc
161 */
162
163__attribute__ ((weak))
164void keyboard_post_init_user() {}
165
166/** \brief keyboard_post_init_kb
167 *
168 * FIXME: needs doc
169 */
170
171__attribute__ ((weak))
172void keyboard_post_init_kb(void) {
173 keyboard_post_init_user();
174}
175
142/** \brief keyboard_setup 176/** \brief keyboard_setup
143 * 177 *
144 * FIXME: needs doc 178 * FIXME: needs doc
@@ -146,6 +180,7 @@ void matrix_setup(void) {
146void keyboard_setup(void) { 180void keyboard_setup(void) {
147 disable_jtag(); 181 disable_jtag();
148 matrix_setup(); 182 matrix_setup();
183 keyboard_pre_init_kb();
149} 184}
150 185
151/** \brief is_keyboard_master 186/** \brief is_keyboard_master
@@ -199,6 +234,7 @@ void keyboard_init(void) {
199#if defined(NKRO_ENABLE) && defined(FORCE_NKRO) 234#if defined(NKRO_ENABLE) && defined(FORCE_NKRO)
200 keymap_config.nkro = 1; 235 keymap_config.nkro = 1;
201#endif 236#endif
237 keyboard_post_init_kb(); /* Always keep this last */
202} 238}
203 239
204/** \brief Keyboard task: Do keyboard routine jobs 240/** \brief Keyboard task: Do keyboard routine jobs