ez with leds
This commit is contained in:
parent
35a81f5b8b
commit
402122744c
7 changed files with 1510 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define DEFAULT_LAYER 0
|
||||
#define COLEMAK_LAYER 1
|
||||
|
@ -74,3 +75,56 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void * matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
void * matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_left_led_1_off();
|
||||
ergodox_left_led_2_off();
|
||||
ergodox_left_led_3_off();
|
||||
switch (layer) {
|
||||
case 1:
|
||||
// all
|
||||
ergodox_left_led_1_on();
|
||||
ergodox_left_led_2_on();
|
||||
ergodox_left_led_3_on();
|
||||
break;
|
||||
case 2:
|
||||
// blue
|
||||
ergodox_left_led_2_on();
|
||||
break;
|
||||
case 8:
|
||||
// blue and green
|
||||
ergodox_left_led_2_on();
|
||||
// break missed intentionally
|
||||
case 3:
|
||||
// green
|
||||
ergodox_left_led_3_on();
|
||||
break;
|
||||
case 6:
|
||||
ergodox_board_led_on();
|
||||
// break missed intentionally
|
||||
case 4:
|
||||
case 5:
|
||||
case 7:
|
||||
// white
|
||||
ergodox_left_led_1_on();
|
||||
break;
|
||||
case 9:
|
||||
// white+green
|
||||
ergodox_left_led_1_on();
|
||||
ergodox_left_led_3_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue