1
0
Fork 0

Move LED strip initialization (#397)

This commit is contained in:
Eric Tang 2016-06-12 15:01:55 -07:00 committed by Jack Humbert
parent 92759be322
commit 6955719075
6 changed files with 18 additions and 33 deletions

View file

@ -11,10 +11,6 @@ void matrix_scan_user(void) {
} }
void matrix_init_kb(void) { void matrix_init_kb(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
matrix_init_user(); matrix_init_user();
} }

View file

@ -26,10 +26,6 @@ void matrix_init_kb(void) {
init_backlight_pin(); init_backlight_pin();
#endif #endif
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
// JTAG disable for PORT F. write JTD bit twice within four cycles. // JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD); MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD); MCUCR |= (1<<JTD);

View file

@ -21,10 +21,6 @@ void matrix_init_kb(void) {
init_backlight_pin(); init_backlight_pin();
#endif #endif
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
// JTAG disable for PORT F. write JTD bit twice within four cycles. // JTAG disable for PORT F. write JTD bit twice within four cycles.
MCUCR |= (1<<JTD); MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD); MCUCR |= (1<<JTD);

View file

@ -19,10 +19,6 @@ void matrix_init_kb(void) {
backlight_init_ports(); backlight_init_ports();
#endif #endif
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
// Turn status LED on // Turn status LED on
DDRE |= (1<<6); DDRE |= (1<<6);
PORTE |= (1<<6); PORTE |= (1<<6);

View file

@ -20,11 +20,6 @@ void matrix_init_kb(void) {
backlight_init_ports(); backlight_init_ports();
#endif #endif
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
// Turn status LED on // Turn status LED on
DDRE |= (1<<6); DDRE |= (1<<6);
PORTE |= (1<<6); PORTE |= (1<<6);

View file

@ -46,6 +46,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef ADB_MOUSE_ENABLE #ifdef ADB_MOUSE_ENABLE
# include "adb.h" # include "adb.h"
#endif #endif
#ifdef RGBLIGHT_ENABLE
# include "rgblight.h"
#endif
#ifdef MATRIX_HAS_GHOST #ifdef MATRIX_HAS_GHOST
static bool is_row_ghosting(uint8_t row){ static bool is_row_ghosting(uint8_t row){
@ -89,6 +92,9 @@ void keyboard_init(void) {
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
backlight_init(); backlight_init();
#endif #endif
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
#if defined(NKRO_ENABLE) && defined(FORCE_NKRO) #if defined(NKRO_ENABLE) && defined(FORCE_NKRO)
keyboard_nkro = true; keyboard_nkro = true;
#endif #endif