aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index b40b40544..8ccdb774b 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
@@ -341,26 +353,20 @@ layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_
341void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { layer_state_set(update_tri_layer_state(layer_state, layer1, layer2, layer3)); } 353void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { layer_state_set(update_tri_layer_state(layer_state, layer1, layer2, layer3)); }
342 354
343void matrix_init_quantum() { 355void matrix_init_quantum() {
344#ifdef BOOTMAGIC_LITE 356 magic();
345 bootmagic_lite();
346#endif
347 if (!eeconfig_is_enabled()) {
348 eeconfig_init();
349 }
350#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) 357#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN)
351 // TODO: remove calls to led_init_ports from keyboards and remove ifdef 358 // TODO: remove calls to led_init_ports from keyboards and remove ifdef
352 led_init_ports(); 359 led_init_ports();
353#endif 360#endif
354#ifdef BACKLIGHT_ENABLE 361#ifdef BACKLIGHT_ENABLE
355# ifdef LED_MATRIX_ENABLE
356 led_matrix_init();
357# else
358 backlight_init_ports(); 362 backlight_init_ports();
359# endif
360#endif 363#endif
361#ifdef AUDIO_ENABLE 364#ifdef AUDIO_ENABLE
362 audio_init(); 365 audio_init();
363#endif 366#endif
367#ifdef LED_MATRIX_ENABLE
368 led_matrix_init();
369#endif
364#ifdef RGB_MATRIX_ENABLE 370#ifdef RGB_MATRIX_ENABLE
365 rgb_matrix_init(); 371 rgb_matrix_init();
366#endif 372#endif