Update GPIO macros in keymaps (#23792)

This commit is contained in:
Ryan 2024-05-25 04:38:57 +10:00 committed by GitHub
parent 612f8fb853
commit d4e88f81ae
21 changed files with 108 additions and 108 deletions

View file

@ -49,38 +49,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//Initialize indicator LEDs
void matrix_init_user(void) {
setPinOutput(B5);
writePinLow(B5);
setPinOutput(B6);
writePinLow(B6);
setPinOutput(B7);
writePinLow(B7);
gpio_set_pin_output(B5);
gpio_write_pin_low(B5);
gpio_set_pin_output(B6);
gpio_write_pin_low(B6);
gpio_set_pin_output(B7);
gpio_write_pin_low(B7);
}
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case 1:
writePinHigh(B7);
writePinLow(B6);
gpio_write_pin_high(B7);
gpio_write_pin_low(B6);
break;
case 2:
writePinLow(B7);
writePinHigh(B6);
gpio_write_pin_low(B7);
gpio_write_pin_high(B6);
break;
case 3:
writePinHigh(B7);
writePinHigh(B6);
gpio_write_pin_high(B7);
gpio_write_pin_high(B6);
break;
default:
writePinLow(B7);
writePinLow(B6);
gpio_write_pin_low(B7);
gpio_write_pin_low(B6);
break;
}
return state;
}
bool led_update_user(led_t led_state) {
writePin(B5, led_state.caps_lock);
gpio_write_pin(B5, led_state.caps_lock);
return false;
}