Update GPIO macros in keymaps (#23792)
This commit is contained in:
parent
8ff8e9eae5
commit
b8f29c3865
82 changed files with 402 additions and 402 deletions
|
@ -47,26 +47,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
void matrix_init_user(void) {
|
||||
// set CapsLock LED to output and low
|
||||
setPinOutput(B1);
|
||||
writePinLow(B1);
|
||||
gpio_set_pin_output(B1);
|
||||
gpio_write_pin_low(B1);
|
||||
// set NumLock LED to output and low
|
||||
setPinOutput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_output(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
// set ScrollLock LED to output and low
|
||||
setPinOutput(B3);
|
||||
writePinLow(B3);
|
||||
gpio_set_pin_output(B3);
|
||||
gpio_write_pin_low(B3);
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.num_lock) {
|
||||
writePinHigh(B2);
|
||||
gpio_write_pin_high(B2);
|
||||
} else {
|
||||
writePinLow(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
}
|
||||
if (led_state.caps_lock) {
|
||||
writePinHigh(B1);
|
||||
gpio_write_pin_high(B1);
|
||||
} else {
|
||||
writePinLow(B1);
|
||||
gpio_write_pin_low(B1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -75,9 +75,9 @@ bool led_update_user(led_t led_state) {
|
|||
layer_state_t layer_state_set_user(layer_state_t state)
|
||||
{
|
||||
if (get_highest_layer(state) == 1) {
|
||||
writePinHigh(B3);
|
||||
gpio_write_pin_high(B3);
|
||||
} else {
|
||||
writePinLow(B3);
|
||||
gpio_write_pin_low(B3);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
|
|
@ -75,26 +75,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
void matrix_init_user(void) {
|
||||
// set CapsLock LED to output and low
|
||||
setPinOutput(B1);
|
||||
writePinLow(B1);
|
||||
gpio_set_pin_output(B1);
|
||||
gpio_write_pin_low(B1);
|
||||
// set NumLock LED to output and low
|
||||
setPinOutput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_output(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
// set ScrollLock LED to output and low
|
||||
setPinOutput(B3);
|
||||
writePinLow(B3);
|
||||
gpio_set_pin_output(B3);
|
||||
gpio_write_pin_low(B3);
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.num_lock) {
|
||||
writePinHigh(B2);
|
||||
gpio_write_pin_high(B2);
|
||||
} else {
|
||||
writePinLow(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
}
|
||||
if (led_state.caps_lock) {
|
||||
writePinHigh(B1);
|
||||
gpio_write_pin_high(B1);
|
||||
} else {
|
||||
writePinLow(B1);
|
||||
gpio_write_pin_low(B1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ bool led_update_user(led_t led_state) {
|
|||
layer_state_t layer_state_set_user(layer_state_t state)
|
||||
{
|
||||
if (get_highest_layer(state) == 1) {
|
||||
writePinHigh(B3);
|
||||
gpio_write_pin_high(B3);
|
||||
} else {
|
||||
writePinLow(B3);
|
||||
gpio_write_pin_low(B3);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue