Update naming convention for GPIO control macros (#23085)
This commit is contained in:
parent
6890c1aeb8
commit
b8646bc40b
12 changed files with 100 additions and 83 deletions
|
@ -56,16 +56,16 @@ This is a template indicator function that can be implemented on keyboard level
|
|||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
// writePin sets the pin high for 1 and low for 0.
|
||||
// gpio_write_pin sets the pin high for 1 and low for 0.
|
||||
// In this example the pins are inverted, setting
|
||||
// it low/0 turns it on, and high/1 turns the LED off.
|
||||
// This behavior depends on whether the LED is between the pin
|
||||
// and VCC or the pin and GND.
|
||||
writePin(B0, !led_state.num_lock);
|
||||
writePin(B1, !led_state.caps_lock);
|
||||
writePin(B2, !led_state.scroll_lock);
|
||||
writePin(B3, !led_state.compose);
|
||||
writePin(B4, !led_state.kana);
|
||||
gpio_write_pin(B0, !led_state.num_lock);
|
||||
gpio_write_pin(B1, !led_state.caps_lock);
|
||||
gpio_write_pin(B2, !led_state.scroll_lock);
|
||||
gpio_write_pin(B3, !led_state.compose);
|
||||
gpio_write_pin(B4, !led_state.kana);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue