forked from mirror/qmk_firmware
Update GPIO API usage in keyboard code (#23361)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "quantum.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(B6);
|
||||
gpio_set_pin_output(B6);
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
@@ -24,7 +24,7 @@ void keyboard_pre_init_kb(void) {
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
writePin(B6, !led_state.caps_lock);
|
||||
gpio_write_pin(B6, !led_state.caps_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ void matrix_init_kb(void) {
|
||||
// runs once when the firmware starts up
|
||||
|
||||
// D3 Numlock, D4 Capslock, D5 Scrlock
|
||||
setPinOutput(INDICATOR_NUM);
|
||||
setPinOutput(INDICATOR_CAPS);
|
||||
setPinOutput(INDICATOR_SCR);
|
||||
gpio_set_pin_output(INDICATOR_NUM);
|
||||
gpio_set_pin_output(INDICATOR_CAPS);
|
||||
gpio_set_pin_output(INDICATOR_SCR);
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
@@ -42,9 +42,9 @@ bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if (res)
|
||||
{
|
||||
writePin(INDICATOR_NUM, !led_state.num_lock);
|
||||
writePin(INDICATOR_CAPS, !led_state.caps_lock);
|
||||
writePin(INDICATOR_SCR, !led_state.scroll_lock);
|
||||
gpio_write_pin(INDICATOR_NUM, !led_state.num_lock);
|
||||
gpio_write_pin(INDICATOR_CAPS, !led_state.caps_lock);
|
||||
gpio_write_pin(INDICATOR_SCR, !led_state.scroll_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user