From 6955719075a9a07524814e4183f3f90f83db1c6a Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Sun, 12 Jun 2016 15:01:55 -0700 Subject: Move LED strip initialization (#397) --- keyboard/clueboard1/clueboard1.c | 4 ---- keyboard/clueboard2/clueboard2.c | 4 ---- keyboard/cluepad/cluepad.c | 4 ---- keyboard/planck/planck.c | 16 ++++++---------- keyboard/preonic/preonic.c | 17 ++++++----------- tmk_core/common/keyboard.c | 6 ++++++ 6 files changed, 18 insertions(+), 33 deletions(-) diff --git a/keyboard/clueboard1/clueboard1.c b/keyboard/clueboard1/clueboard1.c index 289e4644d..136ddf15b 100644 --- a/keyboard/clueboard1/clueboard1.c +++ b/keyboard/clueboard1/clueboard1.c @@ -11,10 +11,6 @@ void matrix_scan_user(void) { } void matrix_init_kb(void) { - #ifdef RGBLIGHT_ENABLE - rgblight_init(); - #endif - matrix_init_user(); } diff --git a/keyboard/clueboard2/clueboard2.c b/keyboard/clueboard2/clueboard2.c index 437f8d1e4..8493c564c 100644 --- a/keyboard/clueboard2/clueboard2.c +++ b/keyboard/clueboard2/clueboard2.c @@ -26,10 +26,6 @@ void matrix_init_kb(void) { init_backlight_pin(); #endif - #ifdef RGBLIGHT_ENABLE - rgblight_init(); - #endif - // JTAG disable for PORT F. write JTD bit twice within four cycles. MCUCR |= (1<. #ifdef ADB_MOUSE_ENABLE # include "adb.h" #endif +#ifdef RGBLIGHT_ENABLE +# include "rgblight.h" +#endif #ifdef MATRIX_HAS_GHOST static bool is_row_ghosting(uint8_t row){ @@ -89,6 +92,9 @@ void keyboard_init(void) { #ifdef BACKLIGHT_ENABLE backlight_init(); #endif +#ifdef RGBLIGHT_ENABLE + rgblight_init(); +#endif #if defined(NKRO_ENABLE) && defined(FORCE_NKRO) keyboard_nkro = true; #endif -- cgit v1.2.3-24-g4f1b