mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-10 18:49:08 +00:00
6c3e404839
* Add indicator light bootup fanfare * move fanfare code to new file * fanfare code in new file and remove unused boards * new startup fanfare code * add lock/unlock indicator animation * input key presses before changing lights * remove old code
30 lines
No EOL
675 B
C
30 lines
No EOL
675 B
C
#include "stanrc85.h"
|
|
|
|
static uint8_t middle = 0;
|
|
static uint8_t bottom = 0;
|
|
|
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
|
middle = bottom = 0;
|
|
switch (get_highest_layer(state)) {
|
|
case _FN1_60:
|
|
middle = 1;
|
|
break;
|
|
case _FN2_60:
|
|
bottom = 1;
|
|
break;
|
|
case _DEFAULT:
|
|
middle = 1;
|
|
bottom = 1;
|
|
break;
|
|
default: // for any other layers, or the default layer
|
|
break;
|
|
}
|
|
return state;
|
|
}
|
|
|
|
bool led_update_user(led_t led_state) {
|
|
writePin(INDICATOR_PIN_0, !led_state.caps_lock);
|
|
writePin(INDICATOR_PIN_1, !middle);
|
|
writePin(INDICATOR_PIN_2, !bottom);
|
|
return false;
|
|
} |