From: Oleg Kostyuk Date: Mon, 14 Oct 2013 20:06:29 +0000 (+0300) Subject: Bugfix: wrong order during init X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=04949711f4abc89c921e48e35e8f818ebb5d3058;p=max%2Ftmk_keyboard.git Bugfix: wrong order during init All credits to Tensor@geekhack http://geekhack.org/index.php?topic=48106.msg1076661#msg1076661 --- diff --git a/keyboard/ergodox/ergodox.c b/keyboard/ergodox/ergodox.c index f8b3d82e..c6a83148 100644 --- a/keyboard/ergodox/ergodox.c +++ b/keyboard/ergodox/ergodox.c @@ -62,8 +62,10 @@ void init_ergodox(void) PORTC |= (1<<7); PORTD |= (1<<7 | 1<<5 | 1<<4); PORTE |= (1<<6); +} - // blink leds +void ergodox_blink_all_leds(void) +{ ergodox_led_all_off(); ergodox_led_all_set(LED_BRIGHTNESS_HI); ergodox_led_all_on(); diff --git a/keyboard/ergodox/ergodox.h b/keyboard/ergodox/ergodox.h index a0511ff3..bcd839c8 100644 --- a/keyboard/ergodox/ergodox.h +++ b/keyboard/ergodox/ergodox.h @@ -46,6 +46,7 @@ Most used files are located at #define OLATB 0x15 void init_ergodox(void); +void ergodox_blink_all_leds(void); uint8_t init_mcp23018(void); uint8_t ergodox_left_leds_update(void); diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index e50932c9..2103a018 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -71,6 +71,7 @@ void matrix_init(void) // initialize row and col init_ergodox(); mcp23018_status = init_mcp23018(); + ergodox_blink_all_leds(); unselect_rows(); init_cols();