diff options
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 80c4e8f00..59d95f2f5 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "quantum.h" | 17 | #include "quantum.h" |
18 | #include "magic.h" | ||
18 | 19 | ||
19 | #ifdef BLUETOOTH_ENABLE | 20 | #ifdef BLUETOOTH_ENABLE |
20 | # include "outputselect.h" | 21 | # include "outputselect.h" |
@@ -233,7 +234,7 @@ bool process_record_quantum(keyrecord_t *record) { | |||
233 | #ifdef AUDIO_ENABLE | 234 | #ifdef AUDIO_ENABLE |
234 | process_audio(keycode, record) && | 235 | process_audio(keycode, record) && |
235 | #endif | 236 | #endif |
236 | #ifdef BACKLIGHT_ENABLE | 237 | #if defined(BACKLIGHT_ENABLE) || defined(LED_MATRIX_ENABLE) |
237 | process_backlight(keycode, record) && | 238 | process_backlight(keycode, record) && |
238 | #endif | 239 | #endif |
239 | #ifdef STENO_ENABLE | 240 | #ifdef STENO_ENABLE |
@@ -318,6 +319,17 @@ bool process_record_quantum(keyrecord_t *record) { | |||
318 | set_output(OUTPUT_BLUETOOTH); | 319 | set_output(OUTPUT_BLUETOOTH); |
319 | return false; | 320 | return false; |
320 | #endif | 321 | #endif |
322 | #ifndef NO_ACTION_ONESHOT | ||
323 | case ONESHOT_TOGGLE: | ||
324 | oneshot_toggle(); | ||
325 | break; | ||
326 | case ONESHOT_ENABLE: | ||
327 | oneshot_enable(); | ||
328 | break; | ||
329 | case ONESHOT_DISABLE: | ||
330 | oneshot_disable(); | ||
331 | break; | ||
332 | #endif | ||
321 | } | 333 | } |
322 | } | 334 | } |
323 | 335 | ||
@@ -369,26 +381,20 @@ void tap_random_base64(void) { | |||
369 | } | 381 | } |
370 | 382 | ||
371 | void matrix_init_quantum() { | 383 | void matrix_init_quantum() { |
372 | #ifdef BOOTMAGIC_LITE | 384 | magic(); |
373 | bootmagic_lite(); | ||
374 | #endif | ||
375 | if (!eeconfig_is_enabled()) { | ||
376 | eeconfig_init(); | ||
377 | } | ||
378 | #if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) | 385 | #if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) |
379 | // TODO: remove calls to led_init_ports from keyboards and remove ifdef | 386 | // TODO: remove calls to led_init_ports from keyboards and remove ifdef |
380 | led_init_ports(); | 387 | led_init_ports(); |
381 | #endif | 388 | #endif |
382 | #ifdef BACKLIGHT_ENABLE | 389 | #ifdef BACKLIGHT_ENABLE |
383 | # ifdef LED_MATRIX_ENABLE | ||
384 | led_matrix_init(); | ||
385 | # else | ||
386 | backlight_init_ports(); | 390 | backlight_init_ports(); |
387 | # endif | ||
388 | #endif | 391 | #endif |
389 | #ifdef AUDIO_ENABLE | 392 | #ifdef AUDIO_ENABLE |
390 | audio_init(); | 393 | audio_init(); |
391 | #endif | 394 | #endif |
395 | #ifdef LED_MATRIX_ENABLE | ||
396 | led_matrix_init(); | ||
397 | #endif | ||
392 | #ifdef RGB_MATRIX_ENABLE | 398 | #ifdef RGB_MATRIX_ENABLE |
393 | rgb_matrix_init(); | 399 | rgb_matrix_init(); |
394 | #endif | 400 | #endif |