mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-09 09:04:17 -04:00
Update GPIO macros in keymaps (#23792)
This commit is contained in:
parent
612f8fb853
commit
d4e88f81ae
21 changed files with 108 additions and 108 deletions
|
@ -51,20 +51,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
|||
|
||||
void matrix_init_user(void) {
|
||||
// set top LED to output and off (active low)
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
gpio_set_pin_output(D5);
|
||||
gpio_write_pin_high(D5);
|
||||
// set middle LED to output and off (active low)
|
||||
setPinOutput(D4);
|
||||
writePinHigh(D4);
|
||||
gpio_set_pin_output(D4);
|
||||
gpio_write_pin_high(D4);
|
||||
// set bottom LED to output and off (active low)
|
||||
setPinOutput(D3);
|
||||
writePinHigh(D3);
|
||||
gpio_set_pin_output(D3);
|
||||
gpio_write_pin_high(D3);
|
||||
}
|
||||
|
||||
// write to above indicators in a binary fashion based on current layer
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(D5, get_highest_layer(state));
|
||||
writePin(D4, !layer_state_cmp(state, 1));
|
||||
writePin(D3, !layer_state_cmp(state, 2));
|
||||
gpio_write_pin(D5, get_highest_layer(state));
|
||||
gpio_write_pin(D4, !layer_state_cmp(state, 1));
|
||||
gpio_write_pin(D3, !layer_state_cmp(state, 2));
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue