ugly workaround for ErgoDoxEZ LED bugs: turn 'em all off

pull/1422/head
Stick 7 years ago
parent 4cf17210b6
commit f397402e10

@ -22,30 +22,30 @@ void matrix_init_kb(void) {
PORTD |= (1<<5 | 1<<4); PORTD |= (1<<5 | 1<<4);
PORTE |= (1<<6); PORTE |= (1<<6);
ergodox_blink_all_leds(); //ergodox_blink_all_leds();
matrix_init_user(); matrix_init_user();
} }
void ergodox_blink_all_leds(void) // void ergodox_blink_all_leds(void)
{ // {
ergodox_led_all_off(); // ergodox_led_all_off();
ergodox_led_all_set(LED_BRIGHTNESS_HI); // ergodox_led_all_set(LED_BRIGHTNESS_HI);
ergodox_right_led_1_on(); // ergodox_right_led_1_on();
_delay_ms(50); // _delay_ms(50);
ergodox_right_led_2_on(); // ergodox_right_led_2_on();
_delay_ms(50); // _delay_ms(50);
ergodox_right_led_3_on(); // ergodox_right_led_3_on();
_delay_ms(50); // _delay_ms(50);
ergodox_right_led_1_off(); // ergodox_right_led_1_off();
_delay_ms(50); // _delay_ms(50);
ergodox_right_led_2_off(); // ergodox_right_led_2_off();
_delay_ms(50); // _delay_ms(50);
ergodox_right_led_3_off(); // ergodox_right_led_3_off();
//ergodox_led_all_on(); // //ergodox_led_all_on();
//_delay_ms(333); // //_delay_ms(333);
ergodox_led_all_off(); // ergodox_led_all_off();
} // }
uint8_t init_mcp23018(void) { uint8_t init_mcp23018(void) {
mcp23018_status = 0x20; mcp23018_status = 0x20;
@ -57,7 +57,7 @@ uint8_t init_mcp23018(void) {
// cli(); // cli();
if (i2c_initialized == 0) { if (i2c_initialized == 0) {
i2c_init(); // on pins D(1,0) i2c_init(); // on pins D(1,0)
i2c_initialized++; i2c_initialized = 1;
_delay_ms(1000); _delay_ms(1000);
} }

@ -183,7 +183,7 @@ uint8_t matrix_scan(void)
print("left side not responding\n"); print("left side not responding\n");
} else { } else {
print("left side attached\n"); print("left side attached\n");
ergodox_blink_all_leds(); // ergodox_blink_all_leds();
} }
} }
} }
@ -391,4 +391,3 @@ static void select_row(uint8_t row)
} }
} }
} }

@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
MT(MOD_RALT, KC_LBRC), KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT, MT(MOD_RALT, KC_LBRC), KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT,
KC_PSCR, _______, KC_PSCR, _______,
KC_NLCK, KC_NLCK,
TG(NUMP), LT(ARRW, C_BSLS), KC_SPC TG(NUMP), LT(ARRW, KC_BSLS), KC_SPC
), ),
/* layer 1: International symbols, etc /* layer 1: International symbols, etc
@ -242,26 +242,26 @@ void matrix_init_user(void) {
// Runs constantly in the background, in a loop. // Runs constantly in the background, in a loop.
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state); // uint8_t layer = biton32(layer_state);
//
ergodox_board_led_off(); // ergodox_board_led_off();
ergodox_right_led_1_off(); // ergodox_right_led_1_off();
ergodox_right_led_2_off(); // ergodox_right_led_2_off();
ergodox_right_led_3_off(); // ergodox_right_led_3_off();
switch (layer) { // switch (layer) {
case INTL: // case INTL:
case INSF: // case INSF:
ergodox_right_led_1_on(); // ergodox_right_led_1_on();
break; // break;
case NUMP: // case NUMP:
ergodox_right_led_2_on(); // ergodox_right_led_2_on();
break; // break;
case ARRW: // case ARRW:
ergodox_right_led_3_on(); // ergodox_right_led_3_on();
break; // break;
default: // default:
// none // // none
break; // break;
} // }
}; };

Loading…
Cancel
Save