From d09a06a1b354760fd0e64a453abade972900e885 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 3 May 2024 15:21:29 +1000 Subject: Update GPIO API usage in keyboard code (#23361) --- keyboards/acheron/apollo/87h/delta/delta.c | 4 ++-- keyboards/acheron/apollo/87htsc/87htsc.c | 4 ++-- keyboards/acheron/athena/alpha/alpha.c | 8 ++++---- keyboards/acheron/athena/beta/beta.c | 8 ++++---- keyboards/acheron/austin/austin.c | 12 +++++------ keyboards/acheron/elongate/delta/delta.c | 32 +++++++++++++++--------------- keyboards/acheron/shark/beta/beta.c | 4 ++-- 7 files changed, 36 insertions(+), 36 deletions(-) (limited to 'keyboards/acheron') diff --git a/keyboards/acheron/apollo/87h/delta/delta.c b/keyboards/acheron/apollo/87h/delta/delta.c index 1e79584a9c..b17fce5c3a 100644 --- a/keyboards/acheron/apollo/87h/delta/delta.c +++ b/keyboards/acheron/apollo/87h/delta/delta.c @@ -18,8 +18,8 @@ along with this program. If not, see . #include "quantum.h" void board_init(void) { - setPinInput(B9); - setPinInput(B10); + gpio_set_pin_input(B9); + gpio_set_pin_input(B10); } led_config_t g_led_config = { { diff --git a/keyboards/acheron/apollo/87htsc/87htsc.c b/keyboards/acheron/apollo/87htsc/87htsc.c index de66897f72..4225c34971 100644 --- a/keyboards/acheron/apollo/87htsc/87htsc.c +++ b/keyboards/acheron/apollo/87htsc/87htsc.c @@ -18,8 +18,8 @@ along with this program. If not, see . #include "quantum.h" void board_init(void) { - setPinInput(B9); - setPinInput(B10); + gpio_set_pin_input(B9); + gpio_set_pin_input(B10); } led_config_t g_led_config = { { diff --git a/keyboards/acheron/athena/alpha/alpha.c b/keyboards/acheron/athena/alpha/alpha.c index 9e4f82f7ad..8fe47eff82 100644 --- a/keyboards/acheron/athena/alpha/alpha.c +++ b/keyboards/acheron/athena/alpha/alpha.c @@ -17,8 +17,8 @@ #include "quantum.h" void board_init(void) { - setPinInput(B6); - setPinInput(B7); + gpio_set_pin_input(B6); + gpio_set_pin_input(B7); } void keyboard_post_init_kb(void){ @@ -34,10 +34,10 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); #ifdef CAPSLOCK_INDICATOR if(res) { - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); } #else - writePin(LED_CAPS_LOCK_PIN, 0); + gpio_write_pin(LED_CAPS_LOCK_PIN, 0); #endif return res; } diff --git a/keyboards/acheron/athena/beta/beta.c b/keyboards/acheron/athena/beta/beta.c index 9ad9c71cc8..fe22128437 100644 --- a/keyboards/acheron/athena/beta/beta.c +++ b/keyboards/acheron/athena/beta/beta.c @@ -17,18 +17,18 @@ #include "quantum.h" void board_init(void) { - setPinInput(B6); - setPinInput(B7); + gpio_set_pin_input(B6); + gpio_set_pin_input(B7); } bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); #ifdef CAPSLOCK_INDICATOR if(res) { - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); } #else - writePin(LED_CAPS_LOCK_PIN, 0); + gpio_write_pin(LED_CAPS_LOCK_PIN, 0); #endif return res; } diff --git a/keyboards/acheron/austin/austin.c b/keyboards/acheron/austin/austin.c index 5c0a4f642d..9a69d1c086 100644 --- a/keyboards/acheron/austin/austin.c +++ b/keyboards/acheron/austin/austin.c @@ -1,18 +1,18 @@ #include "quantum.h" void keyboard_pre_init_kb(void) { - setPinOutput(A0); - setPinOutput(A1); - setPinOutput(A2); + gpio_set_pin_output(A0); + gpio_set_pin_output(A1); + gpio_set_pin_output(A2); keyboard_pre_init_user(); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(A2, led_state.num_lock); - writePin(A0, led_state.caps_lock); - writePin(A1, led_state.scroll_lock); + gpio_write_pin(A2, led_state.num_lock); + gpio_write_pin(A0, led_state.caps_lock); + gpio_write_pin(A1, led_state.scroll_lock); } return true; } diff --git a/keyboards/acheron/elongate/delta/delta.c b/keyboards/acheron/elongate/delta/delta.c index e621b4495b..98b60bae61 100755 --- a/keyboards/acheron/elongate/delta/delta.c +++ b/keyboards/acheron/elongate/delta/delta.c @@ -30,18 +30,18 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED1_PIN, !led_state.num_lock); - writePin(LED2_PIN, !led_state.caps_lock); - writePin(LED3_PIN, !led_state.scroll_lock); + gpio_write_pin(LED1_PIN, !led_state.num_lock); + gpio_write_pin(LED2_PIN, !led_state.caps_lock); + gpio_write_pin(LED3_PIN, !led_state.scroll_lock); } return res; } // Turns off all bottom LEDs void turn_off_bottom_leds(void){ - writePin(LED4_PIN, 1); - writePin(LED5_PIN, 1); - writePin(LED6_PIN, 1); + gpio_write_pin(LED4_PIN, 1); + gpio_write_pin(LED5_PIN, 1); + gpio_write_pin(LED6_PIN, 1); } /* @@ -53,19 +53,19 @@ layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { // The base layer, or layer zero, will be handled by the default case. case 1: - writePin(LED4_PIN, 1); - writePin(LED5_PIN, 0); - writePin(LED6_PIN, 1); + gpio_write_pin(LED4_PIN, 1); + gpio_write_pin(LED5_PIN, 0); + gpio_write_pin(LED6_PIN, 1); break; case 2: - writePin(LED4_PIN, 1); - writePin(LED5_PIN, 1); - writePin(LED6_PIN, 0); + gpio_write_pin(LED4_PIN, 1); + gpio_write_pin(LED5_PIN, 1); + gpio_write_pin(LED6_PIN, 0); break; default: - writePin(LED4_PIN, 0); - writePin(LED5_PIN, 1); - writePin(LED6_PIN, 1); + gpio_write_pin(LED4_PIN, 0); + gpio_write_pin(LED5_PIN, 1); + gpio_write_pin(LED6_PIN, 1); break; } return state; @@ -73,5 +73,5 @@ layer_state_t layer_state_set_kb(layer_state_t state) { // Since the keyboard starts at layer 0, the init function starts LED4 as lit up. void keyboard_post_init_kb(void){ - writePin(LED4_PIN, 0); + gpio_write_pin(LED4_PIN, 0); } diff --git a/keyboards/acheron/shark/beta/beta.c b/keyboards/acheron/shark/beta/beta.c index 5592353ad7..647dac60b7 100644 --- a/keyboards/acheron/shark/beta/beta.c +++ b/keyboards/acheron/shark/beta/beta.c @@ -17,6 +17,6 @@ #include "quantum.h" void board_init(void) { - setPinInput(B6); - setPinInput(B7); + gpio_set_pin_input(B6); + gpio_set_pin_input(B7); } -- cgit v1.2.3