From 77256a1b4ade1019da881791319f0ca49d4a15f8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 27 Mar 2024 15:53:14 +1100 Subject: [PATCH] Update GPIO API usage in keyboard code - `writePinHigh` --- keyboards/3w6/rev1/matrix.c | 2 +- keyboards/3w6/rev2/matrix.c | 2 +- .../4pplet/eagle_viper_rep/rev_b/rev_b.c | 10 +- keyboards/aeboards/ext65/rev1/rev1.c | 2 +- keyboards/aeboards/ext65/rev2/rev2.c | 2 +- keyboards/aeboards/ext65/rev3/rev3.c | 2 +- keyboards/anavi/knob1/knob1.c | 2 +- keyboards/anavi/knobs3/knobs3.c | 2 +- keyboards/argyle/matrix.c | 2 +- keyboards/atomic/atomic.c | 2 +- keyboards/bajjak/bajjak.h | 10 +- keyboards/bioi/g60/g60.c | 2 +- keyboards/bioi/morgan65/morgan65.c | 2 +- keyboards/bioi/s65/s65.c | 2 +- keyboards/bpiphany/ghost_squid/ghost_squid.h | 2 +- keyboards/bpiphany/ghost_squid/matrix.c | 16 +- keyboards/capsunlocked/cu75/cu75.c | 2 +- keyboards/centromere/centromere.c | 12 +- keyboards/centromere/centromere.h | 10 +- keyboards/cipulot/common/ec_switch_matrix.c | 8 +- keyboards/clueboard/2x1800/2019/2019.c | 2 +- keyboards/clueboard/2x1800/2021/max7219.c | 2 +- keyboards/converter/palm_usb/matrix.c | 6 +- keyboards/converter/xt_usb/xt.h | 4 +- keyboards/custommk/evo70_r2/matrix.c | 8 +- keyboards/dekunukem/duckypad/duckypad.c | 4 +- keyboards/dichotomy/dichotomy.c | 6 +- keyboards/dichotomy/dichotomy.h | 6 +- keyboards/dinofizz/fnrow/v1/v1.c | 4 +- keyboards/dk60/dk60.h | 4 +- keyboards/dp60/matrix.c | 54 +++---- keyboards/dumbpad/v0x/v0x.c | 4 +- .../dumbpad/v0x_dualencoder/v0x_dualencoder.c | 4 +- keyboards/dumbpad/v0x_right/v0x_right.c | 4 +- keyboards/dumbpad/v1x/v1x.c | 6 +- .../dumbpad/v1x_dualencoder/v1x_dualencoder.c | 6 +- keyboards/dumbpad/v1x_right/v1x_right.c | 6 +- keyboards/dumbpad/v3x/v3x.c | 6 +- keyboards/durgod/dgk6x/dgk6x.c | 6 +- keyboards/durgod/k310/k310.c | 10 +- keyboards/durgod/k320/k320.c | 10 +- .../commissions/mini1800/mini1800.c | 2 +- keyboards/evyd13/gh80_3700/gh80_3700.c | 10 +- keyboards/evyd13/pockettype/pockettype.c | 4 +- keyboards/evyd13/wasdat/matrix.c | 4 +- keyboards/evyd13/wasdat_code/matrix.c | 4 +- keyboards/ferris/0_1/matrix.c | 2 +- .../chimera_ortho_plus/chimera_ortho_plus.c | 6 +- keyboards/gmmk/numpad/matrix.c | 2 +- keyboards/gmmk/numpad/numpad.c | 2 +- keyboards/handwired/2x5keypad/2x5keypad.c | 2 +- keyboards/handwired/aek64/aek64.c | 2 +- keyboards/handwired/dqz11n1g/matrix.c | 4 +- keyboards/handwired/lagrange/transport.c | 4 +- keyboards/handwired/owlet60/matrix.c | 6 +- .../handwired/prime_exl_plus/prime_exl_plus.c | 2 +- keyboards/handwired/sono1/sono1.c | 10 +- .../symmetric70_proto/debug_config.h | 4 +- keyboards/handwired/traveller/traveller.c | 2 +- keyboards/handwired/woodpad/woodpad.c | 2 +- .../hardwareabstraction/handwire/handwire.c | 4 +- keyboards/hazel/bad_wings/matrix.c | 4 +- keyboards/heliar/wm1_hotswap/wm1_hotswap.c | 6 +- keyboards/hhkb/yang/matrix.c | 6 +- keyboards/hhkb/yang/yang.c | 10 +- .../ibm/model_m/ashpil_usbc/ashpil_usbc.c | 6 +- keyboards/ibm/model_m/mschwingen/matrix.c | 2 +- keyboards/ibm/model_m/mschwingen/mschwingen.c | 4 +- keyboards/ibm/model_m/teensypp/teensypp.c | 6 +- keyboards/idb/idb_60/idb_60.c | 4 +- keyboards/ingrained/matrix.c | 2 +- keyboards/input_club/k_type/is31fl3733-dual.c | 2 +- keyboards/jian/nsrev2/config.h | 6 +- keyboards/jian/rev1/config.h | 6 +- keyboards/jian/rev2/config.h | 6 +- keyboards/kagizaraya/chidori/board.c | 2 +- keyboards/kbdfans/kbd19x/kbd19x.h | 6 +- keyboards/kbdfans/kbd8x/kbd8x.h | 6 +- keyboards/kbdfans/niu_mini/niu_mini.c | 2 +- keyboards/kbdmania/kmac/kmac.c | 10 +- keyboards/kbdmania/kmac/matrix.c | 2 +- keyboards/kbdmania/kmac_pad/matrix.c | 2 +- keyboards/keychron/c2_pro/matrix.c | 8 +- keyboards/keychron/q10/matrix.c | 2 +- keyboards/keychron/q11/q11.c | 2 +- keyboards/keychron/q12/matrix.c | 2 +- keyboards/keychron/q1v2/matrix.c | 2 +- keyboards/keychron/q3/matrix.c | 2 +- keyboards/keychron/q5/matrix.c | 2 +- keyboards/keychron/q6/matrix.c | 2 +- keyboards/keychron/q65/matrix.c | 14 +- keyboards/keychron/v1/matrix.c | 14 +- keyboards/keychron/v10/matrix.c | 14 +- keyboards/keychron/v3/matrix.c | 14 +- keyboards/keychron/v5/matrix.c | 14 +- keyboards/keychron/v6/matrix.c | 14 +- keyboards/keyhive/honeycomb/honeycomb.c | 6 +- keyboards/keyhive/honeycomb/honeycomb.h | 6 +- keyboards/keyhive/navi10/rev0/rev0.c | 2 +- keyboards/keyhive/navi10/rev2/rev2.c | 2 +- keyboards/keyhive/navi10/rev3/rev3.c | 2 +- keyboards/kinesis/kint36/kint36.c | 2 +- keyboards/kinesis/kint41/kint41.c | 2 +- keyboards/kinesis/kintlc/kintlc.c | 2 +- keyboards/kinesis/kintwin/kintwin.c | 2 +- keyboards/kopibeng/typ65/typ65.c | 18 +-- keyboards/kv/revt/revt.c | 2 +- .../dimple/staggered/staggered.c | 2 +- keyboards/lfkeyboards/smk65/revb/revb.c | 2 +- keyboards/lz/erghost/matrix.c | 138 ++++++++--------- keyboards/machkeyboards/mach3/mach3.c | 2 +- keyboards/makeymakey/makeymakey.c | 12 +- keyboards/mariorion_v25/mariorion_v25.c | 18 +-- keyboards/matrix/falcon/falcon.c | 4 +- keyboards/matrix/m12og/rev1/matrix.c | 2 +- .../adelais/standard_led/avr/rev1/matrix.c | 126 +++++++-------- keyboards/mechlovin/hannah910/hannah910.c | 6 +- keyboards/mechlovin/infinity87/rev2/matrix.c | 138 ++++++++--------- keyboards/mechlovin/infinity875/matrix.c | 138 ++++++++--------- keyboards/mechlovin/olly/bb/matrix.c | 146 +++++++++--------- keyboards/mechlovin/olly/jf/rev1/matrix.c | 146 +++++++++--------- keyboards/mechlovin/serratus/matrix.c | 138 ++++++++--------- keyboards/miiiw/blackio83/blackio83.c | 10 +- keyboards/miiiw/blackio83/matrix.c | 4 +- keyboards/miiiw/common/shift_register.c | 8 +- .../monstargear/xo87/solderable/solderable.c | 12 +- .../kastenwagen1840/kastenwagen1840.c | 6 +- .../kastenwagen48/kastenwagen48.c | 6 +- keyboards/percent/canoe_gen2/canoe_gen2.c | 2 +- keyboards/pica40/rev2/rev2.c | 2 +- keyboards/planck/planck.c | 2 +- keyboards/planck/rev6_drop/matrix.c | 2 +- keyboards/planck/rev7/matrix.c | 2 +- keyboards/preonic/rev1/rev1.c | 2 +- keyboards/preonic/rev2/rev2.c | 2 +- keyboards/redox/wireless/wireless.c | 8 +- keyboards/redox/wireless/wireless.h | 8 +- keyboards/redscarf_i/redscarf_i.c | 14 +- keyboards/redscarf_iiplus/verb/matrix.c | 28 ++-- keyboards/redscarf_iiplus/verc/matrix.c | 28 ++-- keyboards/redscarf_iiplus/verd/matrix.c | 28 ++-- keyboards/rookiebwoy/neopad/rev1/rev1.c | 4 +- keyboards/ryanskidmore/rskeys100/matrix.c | 6 +- keyboards/sekigon/grs_70ec/ec_switch_matrix.c | 2 +- keyboards/sekigon/grs_70ec/grs_70ec.c | 4 +- .../sergiopoverony/creator_pro/creator_pro.c | 2 +- keyboards/sirius/uni660/rev1/rev1.c | 6 +- keyboards/sirius/uni660/rev1/rev1.h | 6 +- keyboards/sirius/uni660/rev2/rev2.c | 6 +- keyboards/sirius/uni660/rev2/rev2.h | 6 +- keyboards/skyloong/gk61/pro/pro.c | 2 +- keyboards/skyloong/gk61/pro_48/pro_48.c | 2 +- keyboards/skyloong/gk61/v1/v1.c | 2 +- keyboards/snes_macropad/matrix.c | 12 +- keyboards/telophase/telophase.c | 6 +- keyboards/telophase/telophase.h | 6 +- keyboards/tkc/m0lly/m0lly.c | 2 +- keyboards/tkc/tkc1800/tkc1800.c | 2 +- keyboards/touchpad/matrix.c | 6 +- keyboards/tzarc/djinn/djinn.c | 16 +- keyboards/tzarc/djinn/djinn_portscan_matrix.c | 4 +- keyboards/tzarc/ghoul/ghoul.c | 4 +- keyboards/viktus/minne_topre/ec.c | 2 +- keyboards/viktus/osav2_numpad_topre/ec.c | 2 +- keyboards/viktus/osav2_topre/ec.c | 2 +- keyboards/viktus/styrka_topre/ec.c | 2 +- keyboards/work_louder/micro/matrix.c | 2 +- keyboards/xiudi/xd75/xd75.c | 6 +- keyboards/ymdk/yd60mq/yd60mq.c | 2 +- keyboards/zsa/moonlander/matrix.c | 12 +- 170 files changed, 957 insertions(+), 957 deletions(-) diff --git a/keyboards/3w6/rev1/matrix.c b/keyboards/3w6/rev1/matrix.c index 49b94b0d69a..b15f18e93c4 100644 --- a/keyboards/3w6/rev1/matrix.c +++ b/keyboards/3w6/rev1/matrix.c @@ -166,7 +166,7 @@ static void init_cols(void) { for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { pin_t pin = matrix_col_pins_mcu[pin_index]; setPinInput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/3w6/rev2/matrix.c b/keyboards/3w6/rev2/matrix.c index 04e7a3e9508..d2a07abfa84 100644 --- a/keyboards/3w6/rev2/matrix.c +++ b/keyboards/3w6/rev2/matrix.c @@ -166,7 +166,7 @@ static void init_cols(void) { for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { pin_t pin = matrix_col_pins_mcu[pin_index]; setPinInput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c b/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c index 2e71e34a267..ac83ab0dcd5 100644 --- a/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c +++ b/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c @@ -39,19 +39,19 @@ void setLayerLed(layer_state_t state){ writePinLow(LAYER_5); switch (get_highest_layer(state)) { case 0: - writePinHigh(LAYER_1); + gpio_write_pin_high(LAYER_1); break; case 1: - writePinHigh(LAYER_2); + gpio_write_pin_high(LAYER_2); break; case 2: - writePinHigh(LAYER_3); + gpio_write_pin_high(LAYER_3); break; case 3: - writePinHigh(LAYER_4); + gpio_write_pin_high(LAYER_4); break; case 4: - writePinHigh(LAYER_5); + gpio_write_pin_high(LAYER_5); break; } } diff --git a/keyboards/aeboards/ext65/rev1/rev1.c b/keyboards/aeboards/ext65/rev1/rev1.c index adbae948161..2e5336559e3 100644 --- a/keyboards/aeboards/ext65/rev1/rev1.c +++ b/keyboards/aeboards/ext65/rev1/rev1.c @@ -38,7 +38,7 @@ bool led_update_kb(led_t led_state) { layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(D1); + gpio_write_pin_high(D1); break; default: // for any other layers, or the default layer writePinLow(D1); diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index 934553abcfe..471f52d2d9e 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -92,7 +92,7 @@ bool led_update_kb(led_t led_state) { layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(A14); + gpio_write_pin_high(A14); break; default: // for any other layers, or the default layer writePinLow(A14); diff --git a/keyboards/aeboards/ext65/rev3/rev3.c b/keyboards/aeboards/ext65/rev3/rev3.c index b5e27756ec5..4ac0b110b95 100644 --- a/keyboards/aeboards/ext65/rev3/rev3.c +++ b/keyboards/aeboards/ext65/rev3/rev3.c @@ -28,7 +28,7 @@ void keyboard_pre_init_user(void) { layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(LED_LAYERS_PIN); + gpio_write_pin_high(LED_LAYERS_PIN); break; default: // for any other layers, or the default layer writePinLow(LED_LAYERS_PIN); diff --git a/keyboards/anavi/knob1/knob1.c b/keyboards/anavi/knob1/knob1.c index bb6f1e38bfd..a7e64729229 100644 --- a/keyboards/anavi/knob1/knob1.c +++ b/keyboards/anavi/knob1/knob1.c @@ -7,7 +7,7 @@ void keyboard_post_init_kb(void) { // Enable RGB LED setPinOutput(GP11); - writePinHigh(GP11); + gpio_write_pin_high(GP11); rgblight_enable(); // Offload to the user func diff --git a/keyboards/anavi/knobs3/knobs3.c b/keyboards/anavi/knobs3/knobs3.c index efae0101636..a19399d3e42 100644 --- a/keyboards/anavi/knobs3/knobs3.c +++ b/keyboards/anavi/knobs3/knobs3.c @@ -7,7 +7,7 @@ void keyboard_post_init_kb(void) { // Enable RGB LED setPinOutput(GP11); - writePinHigh(GP11); + gpio_write_pin_high(GP11); rgblight_enable(); // Offload to the user func diff --git a/keyboards/argyle/matrix.c b/keyboards/argyle/matrix.c index 2ca58004212..cdfa61bf12f 100644 --- a/keyboards/argyle/matrix.c +++ b/keyboards/argyle/matrix.c @@ -34,7 +34,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/atomic/atomic.c b/keyboards/atomic/atomic.c index 68f3ce97640..eb2da7ad049 100644 --- a/keyboards/atomic/atomic.c +++ b/keyboards/atomic/atomic.c @@ -22,7 +22,7 @@ void matrix_init_kb(void) { // Turn status LED on setPinOutput(E6); - writePinHigh(E6); + gpio_write_pin_high(E6); matrix_init_user(); } diff --git a/keyboards/bajjak/bajjak.h b/keyboards/bajjak/bajjak.h index c2d2d77ef61..5db6e89c910 100644 --- a/keyboards/bajjak/bajjak.h +++ b/keyboards/bajjak/bajjak.h @@ -53,11 +53,11 @@ uint8_t bajjak_left_leds_update(void); #endif -inline void bajjak_board_led_on(void) { setPinOutput(D6); writePinHigh(D6); } -inline void bajjak_right_led_1_on(void) { setPinOutput(B5); writePinHigh(B5); } -inline void bajjak_right_led_2_on(void) { setPinOutput(B6); writePinHigh(B6); } -inline void bajjak_right_led_3_on(void) { setPinOutput(B7); writePinHigh(B7); } -inline void bajjak_right_led_on(uint8_t led) { setPinOutput(led+4); writePinHigh(led+4); } +inline void bajjak_board_led_on(void) { setPinOutput(D6); gpio_write_pin_high(D6); } +inline void bajjak_right_led_1_on(void) { setPinOutput(B5); gpio_write_pin_high(B5); } +inline void bajjak_right_led_2_on(void) { setPinOutput(B6); gpio_write_pin_high(B6); } +inline void bajjak_right_led_3_on(void) { setPinOutput(B7); gpio_write_pin_high(B7); } +inline void bajjak_right_led_on(uint8_t led) { setPinOutput(led+4); gpio_write_pin_high(led+4); } inline void bajjak_board_led_off(void) { setPinInput(D6); writePinLow(D6); } inline void bajjak_right_led_1_off(void) { setPinInput(B5); writePinLow(B5); } diff --git a/keyboards/bioi/g60/g60.c b/keyboards/bioi/g60/g60.c index 3b387b87608..84226a336af 100644 --- a/keyboards/bioi/g60/g60.c +++ b/keyboards/bioi/g60/g60.c @@ -16,7 +16,7 @@ along with this program. If not, see . void keyboard_pre_init_kb(void) { setPinOutput(F0); - writePinHigh(F0); + gpio_write_pin_high(F0); keyboard_pre_init_user(); } diff --git a/keyboards/bioi/morgan65/morgan65.c b/keyboards/bioi/morgan65/morgan65.c index 3b387b87608..84226a336af 100644 --- a/keyboards/bioi/morgan65/morgan65.c +++ b/keyboards/bioi/morgan65/morgan65.c @@ -16,7 +16,7 @@ along with this program. If not, see . void keyboard_pre_init_kb(void) { setPinOutput(F0); - writePinHigh(F0); + gpio_write_pin_high(F0); keyboard_pre_init_user(); } diff --git a/keyboards/bioi/s65/s65.c b/keyboards/bioi/s65/s65.c index 1bd6b843479..4f4e5c5f418 100644 --- a/keyboards/bioi/s65/s65.c +++ b/keyboards/bioi/s65/s65.c @@ -15,7 +15,7 @@ along with this program. If not, see . #include "quantum.h" void keyboard_pre_init_kb(void) { setPinOutput(F0); - writePinHigh(F0); + gpio_write_pin_high(F0); keyboard_pre_init_user(); } diff --git a/keyboards/bpiphany/ghost_squid/ghost_squid.h b/keyboards/bpiphany/ghost_squid/ghost_squid.h index 63d3ea0d5ea..66d28c7532b 100644 --- a/keyboards/bpiphany/ghost_squid/ghost_squid.h +++ b/keyboards/bpiphany/ghost_squid/ghost_squid.h @@ -20,4 +20,4 @@ along with this program. If not, see . #include "quantum.h" #define fn_led_on() writePinLow(D0) -#define fn_led_off() writePinHigh(D0) +#define fn_led_off() gpio_write_pin_high(D0) diff --git a/keyboards/bpiphany/ghost_squid/matrix.c b/keyboards/bpiphany/ghost_squid/matrix.c index b0ad6075554..99b0a300463 100644 --- a/keyboards/bpiphany/ghost_squid/matrix.c +++ b/keyboards/bpiphany/ghost_squid/matrix.c @@ -64,14 +64,14 @@ void matrix_init_custom(void) { setPinOutput(D6); /* Row input pins */ - writePinHigh(B0); - writePinHigh(B1); - writePinHigh(B2); - writePinHigh(B3); - writePinHigh(B4); - writePinHigh(B5); - writePinHigh(B6); - writePinHigh(C2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); + gpio_write_pin_high(B3); + gpio_write_pin_high(B4); + gpio_write_pin_high(B5); + gpio_write_pin_high(B6); + gpio_write_pin_high(C2); } bool matrix_scan_custom(matrix_row_t current_matrix[]) { diff --git a/keyboards/capsunlocked/cu75/cu75.c b/keyboards/capsunlocked/cu75/cu75.c index f980b0d9e13..5285f0034ed 100644 --- a/keyboards/capsunlocked/cu75/cu75.c +++ b/keyboards/capsunlocked/cu75/cu75.c @@ -21,7 +21,7 @@ void matrix_init_kb(void) PLAY_SONG(test_sound); // Fix port B5 setPinInput(B5); - writePinHigh(B5); + gpio_write_pin_high(B5); #else // If we're not using the audio pin, drive it low setPinOutput(C6); diff --git a/keyboards/centromere/centromere.c b/keyboards/centromere/centromere.c index 8d46520e38e..e1a9fcc499b 100644 --- a/keyboards/centromere/centromere.c +++ b/keyboards/centromere/centromere.c @@ -6,9 +6,9 @@ void led_init(void) { setPinOutput(C5); // Set blue LED pin as output setPinOutput(D1); // Set green LED pin as output - writePinHigh(C4); // Turn off red LED pin - writePinHigh(C5); // Turn off blue LED pin - writePinHigh(D1); // Turn off green LED pin + gpio_write_pin_high(C4); // Turn off red LED pin + gpio_write_pin_high(C5); // Turn off blue LED pin + gpio_write_pin_high(D1); // Turn off green LED pin #else @@ -16,9 +16,9 @@ void led_init(void) { setPinOutput(F5); // Set blue LED pin as output setPinOutput(D1); // Set green LED pin as output - writePinHigh(F4); // Turn off red LED pin - writePinHigh(F5); // Turn off blue LED pin - writePinHigh(D1); // Turn off green LED pin + gpio_write_pin_high(F4); // Turn off red LED pin + gpio_write_pin_high(F5); // Turn off blue LED pin + gpio_write_pin_high(D1); // Turn off green LED pin #endif diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index 078cdca07f1..78370bb97d2 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -3,20 +3,20 @@ #include "quantum.h" #if MCU == atmega32u2 -#define red_led_off writePinHigh(C5) +#define red_led_off gpio_write_pin_high(C5) #define red_led_on writePinLow(C5) -#define blu_led_off writePinHigh(C4) +#define blu_led_off gpio_write_pin_high(C4) #define blu_led_on writePinLow(C4) #else -#define red_led_off writePinHigh(F5) +#define red_led_off gpio_write_pin_high(F5) #define red_led_on writePinLow(F5) -#define blu_led_off writePinHigh(F4) +#define blu_led_off gpio_write_pin_high(F4) #define blu_led_on writePinLow(F4) #endif -#define grn_led_off writePinHigh(D1) +#define grn_led_off gpio_write_pin_high(D1) #define grn_led_on writePinLow(D1) #define set_led_off red_led_off; blu_led_off diff --git a/keyboards/cipulot/common/ec_switch_matrix.c b/keyboards/cipulot/common/ec_switch_matrix.c index 845ef99d223..ac5ba93c583 100644 --- a/keyboards/cipulot/common/ec_switch_matrix.c +++ b/keyboards/cipulot/common/ec_switch_matrix.c @@ -75,7 +75,7 @@ void select_amux_channel(uint8_t channel, uint8_t col) { // Get the channel for the specified multiplexer uint8_t ch = amux_n_col_channels[channel][col]; // momentarily disable specified multiplexer - writePinHigh(amux_en_pins[channel]); + gpio_write_pin_high(amux_en_pins[channel]); // Select the multiplexer channel for (uint8_t i = 0; i < AMUX_SEL_PINS_COUNT; i++) { writePin(amux_sel_pins[i], ch & (1 << i)); @@ -89,7 +89,7 @@ void disable_unused_amux(uint8_t channel) { // disable all the other multiplexers apart from the current selected one for (uint8_t idx = 0; idx < AMUX_COUNT; idx++) { if (idx != channel) { - writePinHigh(amux_en_pins[idx]); + gpio_write_pin_high(amux_en_pins[idx]); } } } @@ -106,11 +106,11 @@ void discharge_capacitor(void) { // Charge the peak hold capacitor void charge_capacitor(uint8_t row) { #ifdef OPEN_DRAIN_SUPPORT - writePinHigh(DISCHARGE_PIN); + gpio_write_pin_high(DISCHARGE_PIN); #else setPinInput(DISCHARGE_PIN); #endif - writePinHigh(row_pins[row]); + gpio_write_pin_high(row_pins[row]); } // Initialize the peripherals pins diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c index 6e19f4f2a80..ea99950c649 100644 --- a/keyboards/clueboard/2x1800/2019/2019.c +++ b/keyboards/clueboard/2x1800/2019/2019.c @@ -48,7 +48,7 @@ void check_encoder_buttons(void) { } else { dprintf("Turning drawing mode on.\n"); drawing_mode = true; - writePinHigh(D6); + gpio_write_pin_high(D6); register_code(KC_BTN1); } } diff --git a/keyboards/clueboard/2x1800/2021/max7219.c b/keyboards/clueboard/2x1800/2021/max7219.c index 1ba22362fe4..2feef056915 100644 --- a/keyboards/clueboard/2x1800/2021/max7219.c +++ b/keyboards/clueboard/2x1800/2021/max7219.c @@ -203,7 +203,7 @@ void max7219_init(void) { dprintf("max7219_init()\n"); setPinOutput(MAX7219_LOAD); - writePinHigh(MAX7219_LOAD); + gpio_write_pin_high(MAX7219_LOAD); spi_init(); for (int i=0; i. void keyboard_pre_init_kb(void) { setPinOutput(A0); - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A0); wait_ms(10); - writePinHigh(A0); + gpio_write_pin_high(A0); keyboard_pre_init_user(); } diff --git a/keyboards/dichotomy/dichotomy.c b/keyboards/dichotomy/dichotomy.c index 4301d9b67d0..a4e9ab37170 100755 --- a/keyboards/dichotomy/dichotomy.c +++ b/keyboards/dichotomy/dichotomy.c @@ -64,9 +64,9 @@ void led_init(void) { setPinOutput(F5); setPinOutput(F6); - writePinHigh(D1); - writePinHigh(F5); - writePinHigh(F6); + gpio_write_pin_high(D1); + gpio_write_pin_high(F5); + gpio_write_pin_high(F6); } diff --git a/keyboards/dichotomy/dichotomy.h b/keyboards/dichotomy/dichotomy.h index f62ed49aa07..720d00bd615 100755 --- a/keyboards/dichotomy/dichotomy.h +++ b/keyboards/dichotomy/dichotomy.h @@ -4,11 +4,11 @@ #include "pointing_device.h" #include "quantum.h" -#define red_led_off() writePinHigh(F6) +#define red_led_off() gpio_write_pin_high(F6) #define red_led_on() writePinLow(F6) -#define blu_led_off() writePinHigh(F5) +#define blu_led_off() gpio_write_pin_high(F5) #define blu_led_on() writePinLow(F5) -#define grn_led_off() writePinHigh(D1) +#define grn_led_off() gpio_write_pin_high(D1) #define grn_led_on() writePinLow(D1) #define red_led(flag) if (flag) red_led_on(); else red_led_off() diff --git a/keyboards/dinofizz/fnrow/v1/v1.c b/keyboards/dinofizz/fnrow/v1/v1.c index d2a5cd71208..a9e5a26f735 100644 --- a/keyboards/dinofizz/fnrow/v1/v1.c +++ b/keyboards/dinofizz/fnrow/v1/v1.c @@ -18,7 +18,7 @@ void keyboard_pre_init_kb(void) { // Immediately set the LED pin as an output and set it ON setPinOutput(A15); - writePinHigh(A15); + gpio_write_pin_high(A15); keyboard_pre_init_user(); } @@ -28,7 +28,7 @@ void keyboard_post_init_kb(void) { // Finish with LED OFF writePinLow(A15); wait_ms(100); - writePinHigh(A15); + gpio_write_pin_high(A15); wait_ms(100); writePinLow(A15); diff --git a/keyboards/dk60/dk60.h b/keyboards/dk60/dk60.h index 05e790d5253..0198f02f70d 100644 --- a/keyboards/dk60/dk60.h +++ b/keyboards/dk60/dk60.h @@ -19,8 +19,8 @@ along with this program. If not, see . #include "quantum.h" -inline void dk60_caps_led_on(void) { writePinHigh(E6); } -inline void dk60_esc_led_on(void) { writePinHigh(F0); } +inline void dk60_caps_led_on(void) { gpio_write_pin_high(E6); } +inline void dk60_esc_led_on(void) { gpio_write_pin_high(F0); } inline void dk60_caps_led_off(void) { writePinLow(E6); } inline void dk60_esc_led_off(void) { writePinLow(F0); } diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c index 253bea4dfce..49afba84409 100644 --- a/keyboards/dp60/matrix.c +++ b/keyboards/dp60/matrix.c @@ -52,7 +52,7 @@ void matrix_scan_user(void) {} void matrix_init(void) { //setPinOutput(F0); - //writePinHigh(F0); + //gpio_write_pin_high(F0); setPinOutput(B4); writePinLow(B4); @@ -176,15 +176,15 @@ static void init_cols(void) static void unselect_cols(void) { - writePinHigh(F0); - writePinHigh(F1); - writePinHigh(F4); - writePinHigh(F5); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); + gpio_write_pin_high(F4); + gpio_write_pin_high(F5); - writePinHigh(D2); - writePinHigh(D3); - writePinHigh(D5); - writePinHigh(D6); + gpio_write_pin_high(D2); + gpio_write_pin_high(D3); + gpio_write_pin_high(D5); + gpio_write_pin_high(D6); } static void select_col(uint8_t col) { @@ -196,34 +196,34 @@ static void select_col(uint8_t col) { writePinLow(F4); break; case 1: - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); writePinLow(F4); break; case 2: writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); writePinLow(F4); break; case 3: - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); writePinLow(F4); break; case 4: writePinLow(F0); writePinLow(F1); - writePinHigh(F4); + gpio_write_pin_high(F4); break; case 5: - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); - writePinHigh(F4); + gpio_write_pin_high(F4); break; case 6: writePinLow(F0); - writePinHigh(F1); - writePinHigh(F4); + gpio_write_pin_high(F1); + gpio_write_pin_high(F4); break; case 7: writePinLow(D2); @@ -231,34 +231,34 @@ static void select_col(uint8_t col) { writePinLow(D5); break; case 8: - writePinHigh(D2); + gpio_write_pin_high(D2); writePinLow(D3); writePinLow(D5); break; case 9: writePinLow(D2); - writePinHigh(D3); + gpio_write_pin_high(D3); writePinLow(D5); break; case 10: - writePinHigh(D2); - writePinHigh(D3); + gpio_write_pin_high(D2); + gpio_write_pin_high(D3); writePinLow(D5); break; case 11: writePinLow(D2); writePinLow(D3); - writePinHigh(D5); + gpio_write_pin_high(D5); break; case 12: - writePinHigh(D2); + gpio_write_pin_high(D2); writePinLow(D3); - writePinHigh(D5); + gpio_write_pin_high(D5); break; case 13: writePinLow(D2); - writePinHigh(D3); - writePinHigh(D5); + gpio_write_pin_high(D3); + gpio_write_pin_high(D5); break; } } diff --git a/keyboards/dumbpad/v0x/v0x.c b/keyboards/dumbpad/v0x/v0x.c index d7e3841d760..2a6fa855f56 100644 --- a/keyboards/dumbpad/v0x/v0x.c +++ b/keyboards/dumbpad/v0x/v0x.c @@ -49,8 +49,8 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c b/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c index d7e3841d760..2a6fa855f56 100644 --- a/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c +++ b/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c @@ -49,8 +49,8 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/dumbpad/v0x_right/v0x_right.c b/keyboards/dumbpad/v0x_right/v0x_right.c index d7e3841d760..2a6fa855f56 100644 --- a/keyboards/dumbpad/v0x_right/v0x_right.c +++ b/keyboards/dumbpad/v0x_right/v0x_right.c @@ -49,8 +49,8 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/dumbpad/v1x/v1x.c b/keyboards/dumbpad/v1x/v1x.c index 1022ad06053..65d82ef6bdf 100644 --- a/keyboards/dumbpad/v1x/v1x.c +++ b/keyboards/dumbpad/v1x/v1x.c @@ -51,9 +51,9 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); - writePinHigh(LED_02); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); + gpio_write_pin_high(LED_02); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c b/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c index 1022ad06053..65d82ef6bdf 100644 --- a/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c +++ b/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c @@ -51,9 +51,9 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); - writePinHigh(LED_02); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); + gpio_write_pin_high(LED_02); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/dumbpad/v1x_right/v1x_right.c b/keyboards/dumbpad/v1x_right/v1x_right.c index 1022ad06053..65d82ef6bdf 100644 --- a/keyboards/dumbpad/v1x_right/v1x_right.c +++ b/keyboards/dumbpad/v1x_right/v1x_right.c @@ -51,9 +51,9 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); - writePinHigh(LED_02); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); + gpio_write_pin_high(LED_02); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/dumbpad/v3x/v3x.c b/keyboards/dumbpad/v3x/v3x.c index 89f13684f26..2c9cc308c36 100644 --- a/keyboards/dumbpad/v3x/v3x.c +++ b/keyboards/dumbpad/v3x/v3x.c @@ -83,9 +83,9 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); - writePinHigh(LED_02); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); + gpio_write_pin_high(LED_02); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/durgod/dgk6x/dgk6x.c b/keyboards/durgod/dgk6x/dgk6x.c index 8e764bae102..3087fc80eb7 100644 --- a/keyboards/durgod/dgk6x/dgk6x.c +++ b/keyboards/durgod/dgk6x/dgk6x.c @@ -18,9 +18,9 @@ /* Private Functions */ void off_all_leds(void) { - writePinHigh(LED_CAPS_LOCK_PIN); - writePinHigh(LED_WIN_LOCK_PIN); - writePinHigh(LED_MR_LOCK_PIN); + gpio_write_pin_high(LED_CAPS_LOCK_PIN); + gpio_write_pin_high(LED_WIN_LOCK_PIN); + gpio_write_pin_high(LED_MR_LOCK_PIN); } void on_all_leds(void) { diff --git a/keyboards/durgod/k310/k310.c b/keyboards/durgod/k310/k310.c index 2c59666982c..bf548b7ada3 100644 --- a/keyboards/durgod/k310/k310.c +++ b/keyboards/durgod/k310/k310.c @@ -22,12 +22,12 @@ /* Private Functions */ void off_all_leds(void) { #ifdef LED_NUM_LOCK_PIN - writePinHigh(LED_NUM_LOCK_PIN); + gpio_write_pin_high(LED_NUM_LOCK_PIN); #endif - writePinHigh(LED_CAPS_LOCK_PIN); - writePinHigh(LED_SCROLL_LOCK_PIN); - writePinHigh(LED_WIN_LOCK_PIN); - writePinHigh(LED_MR_LOCK_PIN); + gpio_write_pin_high(LED_CAPS_LOCK_PIN); + gpio_write_pin_high(LED_SCROLL_LOCK_PIN); + gpio_write_pin_high(LED_WIN_LOCK_PIN); + gpio_write_pin_high(LED_MR_LOCK_PIN); } void on_all_leds(void) { diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k320/k320.c index 148419ee3e4..9d0c0d0542b 100644 --- a/keyboards/durgod/k320/k320.c +++ b/keyboards/durgod/k320/k320.c @@ -22,12 +22,12 @@ /* Private Functions */ void off_all_leds(void) { #ifdef LED_NUM_LOCK_PIN - writePinHigh(LED_NUM_LOCK_PIN); + gpio_write_pin_high(LED_NUM_LOCK_PIN); #endif - writePinHigh(LED_CAPS_LOCK_PIN); - writePinHigh(LED_SCROLL_LOCK_PIN); - writePinHigh(LED_WIN_LOCK_PIN); - writePinHigh(LED_MR_LOCK_PIN); + gpio_write_pin_high(LED_CAPS_LOCK_PIN); + gpio_write_pin_high(LED_SCROLL_LOCK_PIN); + gpio_write_pin_high(LED_WIN_LOCK_PIN); + gpio_write_pin_high(LED_MR_LOCK_PIN); } void on_all_leds(void) { diff --git a/keyboards/enviousdesign/commissions/mini1800/mini1800.c b/keyboards/enviousdesign/commissions/mini1800/mini1800.c index f35be22d134..ec060703b39 100644 --- a/keyboards/enviousdesign/commissions/mini1800/mini1800.c +++ b/keyboards/enviousdesign/commissions/mini1800/mini1800.c @@ -6,7 +6,7 @@ void matrix_init_user(void) { setPinOutput(GP9); //init gpio writePinLow(GP9); setPinOutput(GP11); //init and turn off inverted power led - writePinHigh(GP11); + gpio_write_pin_high(GP11); } //layer, capslock and numlock diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c index 617de50d5dd..d1131f725ca 100644 --- a/keyboards/evyd13/gh80_3700/gh80_3700.c +++ b/keyboards/evyd13/gh80_3700/gh80_3700.c @@ -22,11 +22,11 @@ void led_init_ports(void) { setPinOutput(D1); setPinOutput(F0); - writePinHigh(E6); - writePinHigh(B1); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(F0); + gpio_write_pin_high(E6); + gpio_write_pin_high(B1); + gpio_write_pin_high(D0); + gpio_write_pin_high(D1); + gpio_write_pin_high(F0); } bool led_update_kb(led_t led_state) { diff --git a/keyboards/evyd13/pockettype/pockettype.c b/keyboards/evyd13/pockettype/pockettype.c index b9aee694967..909dd947db4 100644 --- a/keyboards/evyd13/pockettype/pockettype.c +++ b/keyboards/evyd13/pockettype/pockettype.c @@ -18,11 +18,11 @@ void led_init_ports(void) { // * Enable LED anodes (Vbus pin is replaced by B0 on some boards) setPinOutput(B0); - writePinHigh(B0); + gpio_write_pin_high(B0); // * Set our LED pins as output and high setPinOutput(F5); - writePinHigh(F5); + gpio_write_pin_high(F5); setPinOutput(F4); writePinLow(F4); diff --git a/keyboards/evyd13/wasdat/matrix.c b/keyboards/evyd13/wasdat/matrix.c index 70e363fb49a..7f7223d7d2b 100644 --- a/keyboards/evyd13/wasdat/matrix.c +++ b/keyboards/evyd13/wasdat/matrix.c @@ -58,7 +58,7 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { if (col_pins[col] != NO_PIN) { setPinOutput(col_pins[col]); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } else { sn74x138_set_addr(0); } @@ -69,7 +69,7 @@ static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { if (col_pins[x] != NO_PIN) { setPinOutput(col_pins[x]); - writePinHigh(col_pins[x]); + gpio_write_pin_high(col_pins[x]); } } diff --git a/keyboards/evyd13/wasdat_code/matrix.c b/keyboards/evyd13/wasdat_code/matrix.c index b039d2e6a6e..ee8b1360fd2 100644 --- a/keyboards/evyd13/wasdat_code/matrix.c +++ b/keyboards/evyd13/wasdat_code/matrix.c @@ -61,7 +61,7 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { if (col_pins[col] != NO_PIN) { setPinOutput(col_pins[col]); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } else { sn74x138_set_enabled(false); } @@ -72,7 +72,7 @@ static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { if (col_pins[x] != NO_PIN) { setPinOutput(col_pins[x]); - writePinHigh(col_pins[x]); + gpio_write_pin_high(col_pins[x]); } } diff --git a/keyboards/ferris/0_1/matrix.c b/keyboards/ferris/0_1/matrix.c index 6baa46ee509..d3ed9c90b7a 100644 --- a/keyboards/ferris/0_1/matrix.c +++ b/keyboards/ferris/0_1/matrix.c @@ -183,7 +183,7 @@ static void init_cols(void) { for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { pin_t pin = matrix_col_pins_mcu[pin_index]; setPinInput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/glenpickle/chimera_ortho_plus/chimera_ortho_plus.c b/keyboards/glenpickle/chimera_ortho_plus/chimera_ortho_plus.c index 6d87ed7053f..0747146948e 100644 --- a/keyboards/glenpickle/chimera_ortho_plus/chimera_ortho_plus.c +++ b/keyboards/glenpickle/chimera_ortho_plus/chimera_ortho_plus.c @@ -4,9 +4,9 @@ void led_init(void) { setPinOutput(D1); setPinOutput(F4); setPinOutput(F5); - writePinHigh(D1); - writePinHigh(F4); - writePinHigh(F5); + gpio_write_pin_high(D1); + gpio_write_pin_high(F4); + gpio_write_pin_high(F5); } diff --git a/keyboards/gmmk/numpad/matrix.c b/keyboards/gmmk/numpad/matrix.c index 0cc62e90b4e..ccb3212d2f0 100644 --- a/keyboards/gmmk/numpad/matrix.c +++ b/keyboards/gmmk/numpad/matrix.c @@ -32,7 +32,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/gmmk/numpad/numpad.c b/keyboards/gmmk/numpad/numpad.c index 5a2bbdb1f61..feb775bea31 100644 --- a/keyboards/gmmk/numpad/numpad.c +++ b/keyboards/gmmk/numpad/numpad.c @@ -112,7 +112,7 @@ led_config_t g_led_config = {{ void keyboard_pre_init_user(void) { wait_ms(2000); setPinOutput(AW20216S_PW_EN_PIN); - writePinHigh(AW20216S_PW_EN_PIN); + gpio_write_pin_high(AW20216S_PW_EN_PIN); } # endif diff --git a/keyboards/handwired/2x5keypad/2x5keypad.c b/keyboards/handwired/2x5keypad/2x5keypad.c index 873c579a179..0d173489e6b 100644 --- a/keyboards/handwired/2x5keypad/2x5keypad.c +++ b/keyboards/handwired/2x5keypad/2x5keypad.c @@ -21,5 +21,5 @@ void turn_off_leds(void) void turn_on_led(pin_t pin) { - writePinHigh(pin); + gpio_write_pin_high(pin); } diff --git a/keyboards/handwired/aek64/aek64.c b/keyboards/handwired/aek64/aek64.c index 0646d308d0e..4f48f1e1587 100644 --- a/keyboards/handwired/aek64/aek64.c +++ b/keyboards/handwired/aek64/aek64.c @@ -30,7 +30,7 @@ void keyboard_pre_init_user(void) { void matrix_init_kb(void) { // Flash the led 1 sec on startup. - writePinHigh(C3); + gpio_write_pin_high(C3); wait_ms(1000); writePinLow(C3); } diff --git a/keyboards/handwired/dqz11n1g/matrix.c b/keyboards/handwired/dqz11n1g/matrix.c index d93dd853b6a..343237a9993 100644 --- a/keyboards/handwired/dqz11n1g/matrix.c +++ b/keyboards/handwired/dqz11n1g/matrix.c @@ -60,7 +60,7 @@ void matrix_init_custom(void) { static void select_row(uint8_t row) { pin_t pin = row_pins[row]; if (pin != NO_PIN) { - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -87,7 +87,7 @@ bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) matrix_output_select_delay(); /* Set shift register SH/~LD pin to "shift" mode */ - writePinHigh(ROW_SHIFT_PIN); + gpio_write_pin_high(ROW_SHIFT_PIN); /* For each octet of columns... */ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index += 8) { diff --git a/keyboards/handwired/lagrange/transport.c b/keyboards/handwired/lagrange/transport.c index 8f6973925ff..078806f125a 100644 --- a/keyboards/handwired/lagrange/transport.c +++ b/keyboards/handwired/lagrange/transport.c @@ -66,7 +66,7 @@ bool shake_hands(bool master) { } if (master) { - writePinHigh(SPI_SS_PIN); + gpio_write_pin_high(SPI_SS_PIN); } } while (i < 8); @@ -178,7 +178,7 @@ void transport_master_init(void) { * above depends on it and the SPI master driver won't do it * before we call spi_start(). */ - writePinHigh(SPI_SS_PIN); + gpio_write_pin_high(SPI_SS_PIN); setPinOutput(SPI_SS_PIN); spi_init(); diff --git a/keyboards/handwired/owlet60/matrix.c b/keyboards/handwired/owlet60/matrix.c index f0582bd5de7..58de9900341 100644 --- a/keyboards/handwired/owlet60/matrix.c +++ b/keyboards/handwired/owlet60/matrix.c @@ -278,7 +278,7 @@ static void mux_pin_control(const uint8_t binary[]) { writePinLow(col_select_pins[0]); } else { - writePinHigh(col_select_pins[0]); + gpio_write_pin_high(col_select_pins[0]); } // set pin1 setPinOutput(col_select_pins[1]); @@ -286,7 +286,7 @@ static void mux_pin_control(const uint8_t binary[]) { writePinLow(col_select_pins[1]); } else { - writePinHigh(col_select_pins[1]); + gpio_write_pin_high(col_select_pins[1]); } // set pin2 setPinOutput(col_select_pins[2]); @@ -294,6 +294,6 @@ static void mux_pin_control(const uint8_t binary[]) { writePinLow(col_select_pins[2]); } else { - writePinHigh(col_select_pins[2]); + gpio_write_pin_high(col_select_pins[2]); } } diff --git a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c index cc7f5de31ef..4094a087469 100644 --- a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c +++ b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c @@ -41,7 +41,7 @@ bool led_update_kb(led_t led_state) { layer_state_t layer_state_set_kb(layer_state_t state) { if (get_highest_layer(state) == 1) { - writePinHigh(B2); + gpio_write_pin_high(B2); } else { writePinLow(B2); } diff --git a/keyboards/handwired/sono1/sono1.c b/keyboards/handwired/sono1/sono1.c index d19f188a191..96915327299 100644 --- a/keyboards/handwired/sono1/sono1.c +++ b/keyboards/handwired/sono1/sono1.c @@ -24,11 +24,11 @@ void matrix_init_kb(void) { setPinOutput(LED_NUM_LOCK_PIN); setPinOutput(LED_KB_LOCK_PIN); - writePinHigh(LED_KANA_PIN); - writePinHigh(LED_CAPS_LOCK_PIN); - writePinHigh(LED_CTRL_XFER_PIN); - writePinHigh(LED_NUM_LOCK_PIN); - writePinHigh(LED_KB_LOCK_PIN); + gpio_write_pin_high(LED_KANA_PIN); + gpio_write_pin_high(LED_CAPS_LOCK_PIN); + gpio_write_pin_high(LED_CTRL_XFER_PIN); + gpio_write_pin_high(LED_NUM_LOCK_PIN); + gpio_write_pin_high(LED_KB_LOCK_PIN); matrix_init_user(); } diff --git a/keyboards/handwired/symmetric70_proto/debug_config.h b/keyboards/handwired/symmetric70_proto/debug_config.h index cba99e402fa..17414af81c1 100644 --- a/keyboards/handwired/symmetric70_proto/debug_config.h +++ b/keyboards/handwired/symmetric70_proto/debug_config.h @@ -15,7 +15,7 @@ static inline void setDebugPinOutput_Low(void) { #define MATRIX_DEBUG_PIN_INIT() setDebugPinOutput_Low() #ifdef MATRIX_DEBUG_SCAN -# define MATRIX_DEBUG_SCAN_START() writePinHigh(MATRIX_DEBUG_PIN) +# define MATRIX_DEBUG_SCAN_START() gpio_write_pin_high(MATRIX_DEBUG_PIN) # define MATRIX_DEBUG_SCAN_END() writePinLow(MATRIX_DEBUG_PIN) #else # define MATRIX_DEBUG_SCAN_START() @@ -23,7 +23,7 @@ static inline void setDebugPinOutput_Low(void) { #endif #ifdef MATRIX_DEBUG_DELAY -# define MATRIX_DEBUG_DELAY_START() writePinHigh(MATRIX_DEBUG_PIN) +# define MATRIX_DEBUG_DELAY_START() gpio_write_pin_high(MATRIX_DEBUG_PIN) # define MATRIX_DEBUG_DELAY_END() writePinLow(MATRIX_DEBUG_PIN) #else # define MATRIX_DEBUG_DELAY_START() diff --git a/keyboards/handwired/traveller/traveller.c b/keyboards/handwired/traveller/traveller.c index 91c6f603b1a..8d0ac001fd1 100644 --- a/keyboards/handwired/traveller/traveller.c +++ b/keyboards/handwired/traveller/traveller.c @@ -12,7 +12,7 @@ void matrix_init_kb(void) { // Turn status LED on setPinOutput(C7); - writePinHigh(C7); + gpio_write_pin_high(C7); matrix_init_user(); } diff --git a/keyboards/handwired/woodpad/woodpad.c b/keyboards/handwired/woodpad/woodpad.c index 71bc0ba71e8..a049ff41479 100644 --- a/keyboards/handwired/woodpad/woodpad.c +++ b/keyboards/handwired/woodpad/woodpad.c @@ -22,7 +22,7 @@ void keyboard_pre_init_kb(void) { } inline void numlock_led_on(void) { - writePinHigh(F7); + gpio_write_pin_high(F7); } inline void numlock_led_off(void) { diff --git a/keyboards/hardwareabstraction/handwire/handwire.c b/keyboards/hardwareabstraction/handwire/handwire.c index 4981e703e40..fafd60ece4c 100644 --- a/keyboards/hardwareabstraction/handwire/handwire.c +++ b/keyboards/hardwareabstraction/handwire/handwire.c @@ -50,7 +50,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if(!buzzer_active){ buzzer_active = true; buzzer_timer = timer_read(); - writePinHigh(BUZZER_PIN); + gpio_write_pin_high(BUZZER_PIN); } } @@ -94,7 +94,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if(buzzer_on == true){ buzzer_active = true; buzzer_timer = timer_read(); - writePinHigh(BUZZER_PIN); + gpio_write_pin_high(BUZZER_PIN); } else{ writePinLow(BUZZER_PIN); diff --git a/keyboards/hazel/bad_wings/matrix.c b/keyboards/hazel/bad_wings/matrix.c index 2e2aea8f274..a81a0a61629 100644 --- a/keyboards/hazel/bad_wings/matrix.c +++ b/keyboards/hazel/bad_wings/matrix.c @@ -53,7 +53,7 @@ bool sr_74hc595_spi_send_byte(uint8_t data) { matrix_io_delay(); spi_write(data); matrix_io_delay(); - writePinHigh(SHIFTREG_MATRIX_COL_CS); + gpio_write_pin_high(SHIFTREG_MATRIX_COL_CS); sr_74hc595_spi_stop(); return true; } @@ -87,7 +87,7 @@ void matrix_init_custom(void) { } // Set the CS to low by default, and specify as an output pin - writePinHigh(SHIFTREG_MATRIX_COL_CS); // should be high when using SPI? + gpio_write_pin_high(SHIFTREG_MATRIX_COL_CS); // should be high when using SPI? setPinOutput(SHIFTREG_MATRIX_COL_CS); // Since it's the init, deactivate all the columns. We'll activate once we get to the matrix scan diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c index 846729a3f0a..1005c5cd63b 100644 --- a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c +++ b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c @@ -20,11 +20,11 @@ void keyboard_pre_init_kb(void) { setPinOutput(D7); - writePinHigh(D7); + gpio_write_pin_high(D7); setPinOutput(D6); - writePinHigh(D6); + gpio_write_pin_high(D6); setPinOutput(D4); - writePinHigh(D4); + gpio_write_pin_high(D4); } bool led_update_kb(led_t led_state) { diff --git a/keyboards/hhkb/yang/matrix.c b/keyboards/hhkb/yang/matrix.c index 1efa8d16577..0835abbc9c8 100644 --- a/keyboards/hhkb/yang/matrix.c +++ b/keyboards/hhkb/yang/matrix.c @@ -30,9 +30,9 @@ uint8_t power_save_level; static uint32_t matrix_last_modified = 0; static inline void key_strobe_high(void) { writePinLow(B6); } -static inline void key_strobe_low(void) { writePinHigh(B6); } +static inline void key_strobe_low(void) { gpio_write_pin_high(B6); } static inline bool key_state(void) { return gpio_read_pin(D7); } -static inline void key_prev_on(void) { writePinHigh(B7); } +static inline void key_prev_on(void) { gpio_write_pin_high(B7); } static inline void key_prev_off(void) { writePinLow(B7); } static inline bool key_power_state(void) { return !gpio_read_pin(D6); } @@ -58,7 +58,7 @@ void matrix_power_down(void) { PORTB = 0xFF; // switch MOS FET off setPinOutput(D6); - writePinHigh(D6); + gpio_write_pin_high(D6); } static inline void key_select_row(uint8_t row) { PORTB = (PORTB & 0b11111000) | ((row)&0b111); } diff --git a/keyboards/hhkb/yang/yang.c b/keyboards/hhkb/yang/yang.c index 548f0dd734b..124272c929d 100644 --- a/keyboards/hhkb/yang/yang.c +++ b/keyboards/hhkb/yang/yang.c @@ -21,13 +21,13 @@ extern uint8_t power_save_level; void hhkb_led_on(uint8_t led) { switch (led) { case 1: - writePinHigh(F4); + gpio_write_pin_high(F4); break; case 2: - writePinHigh(F2); + gpio_write_pin_high(F2); break; case 3: - writePinHigh(F0); + gpio_write_pin_high(F0); break; } } @@ -63,7 +63,7 @@ void keyboard_pre_init_kb(void) { // Key strobe setPinOutput(B6); - writePinHigh(B6); + gpio_write_pin_high(B6); // Key: input with pull-up setPinInputHigh(D7); @@ -93,7 +93,7 @@ void suspend_power_down_kb(void) { // Disable UART TX to avoid current leakage UCSR1B &= ~_BV(TXEN1); // Power down BLE module - writePinHigh(D5); + gpio_write_pin_high(D5); } suspend_power_down_user(); diff --git a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c index 92b577635c8..273ede6b600 100644 --- a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c +++ b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c @@ -21,9 +21,9 @@ void keyboard_pre_init_kb(void) { setPinOutput(D5); setPinOutput(D6); setPinOutput(D7); - writePinHigh(D5); - writePinHigh(D6); - writePinHigh(D7); + gpio_write_pin_high(D5); + gpio_write_pin_high(D6); + gpio_write_pin_high(D7); } bool led_update_kb(led_t led_state) { diff --git a/keyboards/ibm/model_m/mschwingen/matrix.c b/keyboards/ibm/model_m/mschwingen/matrix.c index 361803edec4..93c53d035e3 100644 --- a/keyboards/ibm/model_m/mschwingen/matrix.c +++ b/keyboards/ibm/model_m/mschwingen/matrix.c @@ -55,7 +55,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) matrix_io_delay(); writePinLow(SR_LOAD_PIN); - writePinHigh(SR_LOAD_PIN); + gpio_write_pin_high(SR_LOAD_PIN); row_data = spi_read() << 8; row_data |= spi_read(); diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c index 6a8a0ec8fcd..490303caf40 100644 --- a/keyboards/ibm/model_m/mschwingen/mschwingen.c +++ b/keyboards/ibm/model_m/mschwingen/mschwingen.c @@ -74,7 +74,7 @@ void sleep_led_toggle(void) {} void sleep_led_disable(void) { suspend_active = false; - writePinHigh(MODELM_STATUS_LED); + gpio_write_pin_high(MODELM_STATUS_LED); } void sleep_led_enable(void) { @@ -102,7 +102,7 @@ void keyboard_pre_init_kb(void) { writePinLow(MODELM_LED_NUMLOCK); #endif setPinOutput(MODELM_STATUS_LED); - writePinHigh(MODELM_STATUS_LED); + gpio_write_pin_high(MODELM_STATUS_LED); _delay_ms(50); #ifdef UART_DEBUG uart_init(115200); diff --git a/keyboards/ibm/model_m/teensypp/teensypp.c b/keyboards/ibm/model_m/teensypp/teensypp.c index fa8669dc810..fc5b8e4df8d 100644 --- a/keyboards/ibm/model_m/teensypp/teensypp.c +++ b/keyboards/ibm/model_m/teensypp/teensypp.c @@ -20,9 +20,9 @@ void led_init_ports(void) { setPinOutput(B4); setPinOutput(B5); setPinOutput(B6); - writePinHigh(B4); - writePinHigh(B5); - writePinHigh(B6); + gpio_write_pin_high(B4); + gpio_write_pin_high(B5); + gpio_write_pin_high(B6); } bool led_update_kb(led_t led_state) { diff --git a/keyboards/idb/idb_60/idb_60.c b/keyboards/idb/idb_60/idb_60.c index 1ca4b8796f5..dbcac7a8d37 100644 --- a/keyboards/idb/idb_60/idb_60.c +++ b/keyboards/idb/idb_60/idb_60.c @@ -14,11 +14,11 @@ inline void _idb_60_fn_led_on(void) { } inline void _idb_60_caps_led_off(void) { - writePinHigh(C5); + gpio_write_pin_high(C5); } inline void _idb_60_fn_led_off(void) { - writePinHigh(C4); + gpio_write_pin_high(C4); } // Capslock LED indicator diff --git a/keyboards/ingrained/matrix.c b/keyboards/ingrained/matrix.c index 60a094b3fca..2591bedeb85 100644 --- a/keyboards/ingrained/matrix.c +++ b/keyboards/ingrained/matrix.c @@ -181,7 +181,7 @@ static void init_cols(void) { for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { pin_t pin = matrix_col_pins_mcu[pin_index]; setPinInput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c index 9e1e6b57f76..90f4acc09c4 100644 --- a/keyboards/input_club/k_type/is31fl3733-dual.c +++ b/keyboards/input_club/k_type/is31fl3733-dual.c @@ -129,7 +129,7 @@ void is31fl3733_write_pwm_buffer(uint8_t bus, uint8_t index) { void is31fl3733_init_drivers(void) { #if defined(IS31FL3733_SDB_PIN) setPinOutput(IS31FL3733_SDB_PIN); - writePinHigh(IS31FL3733_SDB_PIN); + gpio_write_pin_high(IS31FL3733_SDB_PIN); #endif i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN); diff --git a/keyboards/jian/nsrev2/config.h b/keyboards/jian/nsrev2/config.h index 7df400367fc..328fd696405 100644 --- a/keyboards/jian/nsrev2/config.h +++ b/keyboards/jian/nsrev2/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) #endif // NUM_INVERT #else -#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN) +#define RESET_NUM_LOCK_LED() gpio_write_pin_high(NUM_LOCK_LED_PIN) #ifdef NUM_INVERT #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) #else @@ -76,7 +76,7 @@ along with this program. If not, see . #define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN) #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) #else -#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN) +#define RESET_CAPS_LOCK_LED() gpio_write_pin_high(CAPS_LOCK_LED_PIN) #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) #endif // CAPS_NMOSFET @@ -84,6 +84,6 @@ along with this program. If not, see . #define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN) #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) #else -#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN) +#define RESET_SCROLL_LOCK_LED() gpio_write_pin_high(SCROLL_LOCK_LED_PIN) #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) #endif // SCROLL_NMOSFET diff --git a/keyboards/jian/rev1/config.h b/keyboards/jian/rev1/config.h index fcdf59f0446..6304bea5a91 100644 --- a/keyboards/jian/rev1/config.h +++ b/keyboards/jian/rev1/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) #endif // NUM_INVERT #else -#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN) +#define RESET_NUM_LOCK_LED() gpio_write_pin_high(NUM_LOCK_LED_PIN) #ifdef NUM_INVERT #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) #else @@ -58,7 +58,7 @@ along with this program. If not, see . #define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN) #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) #else -#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN) +#define RESET_CAPS_LOCK_LED() gpio_write_pin_high(CAPS_LOCK_LED_PIN) #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) #endif // CAPS_NMOSFET @@ -66,7 +66,7 @@ along with this program. If not, see . #define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN) #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) #else -#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN) +#define RESET_SCROLL_LOCK_LED() gpio_write_pin_high(SCROLL_LOCK_LED_PIN) #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) #endif // SCROLL_NMOSFET diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h index 091605665e6..8f91a3e9cb9 100644 --- a/keyboards/jian/rev2/config.h +++ b/keyboards/jian/rev2/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) #endif // NUM_INVERT #else -#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN) +#define RESET_NUM_LOCK_LED() gpio_write_pin_high(NUM_LOCK_LED_PIN) #ifdef NUM_INVERT #define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) #else @@ -64,7 +64,7 @@ along with this program. If not, see . #define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN) #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) #else -#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN) +#define RESET_CAPS_LOCK_LED() gpio_write_pin_high(CAPS_LOCK_LED_PIN) #define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) #endif // CAPS_NMOSFET @@ -72,6 +72,6 @@ along with this program. If not, see . #define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN) #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) #else -#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN) +#define RESET_SCROLL_LOCK_LED() gpio_write_pin_high(SCROLL_LOCK_LED_PIN) #define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) #endif // SCROLL_NMOSFET diff --git a/keyboards/kagizaraya/chidori/board.c b/keyboards/kagizaraya/chidori/board.c index abe1dc388a1..4250cedae24 100644 --- a/keyboards/kagizaraya/chidori/board.c +++ b/keyboards/kagizaraya/chidori/board.c @@ -62,7 +62,7 @@ static void board_set_master_led(board_info_t* board, uint8_t led_index, bool st pin_t pin = board->led_pins[led_index]; board->led_status[led_index] = status; setPinOutput(pin); - status ? writePinHigh(pin) : writePinLow(pin); + status ? gpio_write_pin_high(pin) : writePinLow(pin); } static void board_set_slave_led(board_info_t* board, uint8_t led_index, bool status) { diff --git a/keyboards/kbdfans/kbd19x/kbd19x.h b/keyboards/kbdfans/kbd19x/kbd19x.h index 33bebeb882f..c7159c0f782 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.h +++ b/keyboards/kbdfans/kbd19x/kbd19x.h @@ -20,11 +20,11 @@ along with this program. If not, see . #include "quantum.h" #include "led.h" -inline void kbd19x_caps_led_on(void) { writePinHigh(LED_CAPS_LOCK_PIN); } +inline void kbd19x_caps_led_on(void) { gpio_write_pin_high(LED_CAPS_LOCK_PIN); } inline void kbd19x_caps_led_off(void) { writePinLow(LED_CAPS_LOCK_PIN); } -inline void kbd19x_sclk_led_on(void) { writePinHigh(LED_SCROLL_LOCK_PIN); } +inline void kbd19x_sclk_led_on(void) { gpio_write_pin_high(LED_SCROLL_LOCK_PIN); } inline void kbd19x_sclk_led_off(void) { writePinLow(LED_SCROLL_LOCK_PIN); } -inline void kbd19x_nmlk_led_on(void) { writePinHigh(LED_NUM_LOCK_PIN); } +inline void kbd19x_nmlk_led_on(void) { gpio_write_pin_high(LED_NUM_LOCK_PIN); } inline void kbd19x_nmlk_led_off(void) { writePinLow(LED_NUM_LOCK_PIN); } diff --git a/keyboards/kbdfans/kbd8x/kbd8x.h b/keyboards/kbdfans/kbd8x/kbd8x.h index a0a1ac73904..178cf94db18 100644 --- a/keyboards/kbdfans/kbd8x/kbd8x.h +++ b/keyboards/kbdfans/kbd8x/kbd8x.h @@ -19,11 +19,11 @@ #include "led.h" // Functions for setting LEDs on toggle keys -inline void caps_led_on(void) { writePinHigh(LED_CAPS_LOCK_PIN); } +inline void caps_led_on(void) { gpio_write_pin_high(LED_CAPS_LOCK_PIN); } inline void caps_led_off(void) { writePinLow(LED_CAPS_LOCK_PIN); } -inline void num_led_on(void) { writePinHigh(LED_NUM_LOCK_PIN); } +inline void num_led_on(void) { gpio_write_pin_high(LED_NUM_LOCK_PIN); } inline void num_led_off(void) { writePinLow(LED_NUM_LOCK_PIN); } -inline void scroll_led_on(void) { writePinHigh(LED_SCROLL_LOCK_PIN); } +inline void scroll_led_on(void) { gpio_write_pin_high(LED_SCROLL_LOCK_PIN); } inline void scroll_led_off(void) { writePinLow(LED_SCROLL_LOCK_PIN); } diff --git a/keyboards/kbdfans/niu_mini/niu_mini.c b/keyboards/kbdfans/niu_mini/niu_mini.c index 02b2ca6590f..a45eb15830f 100644 --- a/keyboards/kbdfans/niu_mini/niu_mini.c +++ b/keyboards/kbdfans/niu_mini/niu_mini.c @@ -13,7 +13,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_kb(void) { // Turn status LED on setPinOutput(E6); - writePinHigh(E6); + gpio_write_pin_high(E6); matrix_init_user(); } diff --git a/keyboards/kbdmania/kmac/kmac.c b/keyboards/kbdmania/kmac/kmac.c index 29f70910846..f81e05cede5 100644 --- a/keyboards/kbdmania/kmac/kmac.c +++ b/keyboards/kbdmania/kmac/kmac.c @@ -36,7 +36,7 @@ void backlight_init_ports(void) { void backlight_set(uint8_t level) { // F-row if (level & F_ROW_MASK) { - writePinHigh(B1); + gpio_write_pin_high(B1); } else { writePinLow(B1); } @@ -48,9 +48,9 @@ void backlight_set(uint8_t level) { writePinLow(B4); writePinLow(D7); } else { - writePinHigh(B2); - writePinHigh(B3); - writePinHigh(B4); - writePinHigh(D7); + gpio_write_pin_high(B2); + gpio_write_pin_high(B3); + gpio_write_pin_high(B4); + gpio_write_pin_high(D7); } } diff --git a/keyboards/kbdmania/kmac/matrix.c b/keyboards/kbdmania/kmac/matrix.c index 99b46faeed5..37b809dad6b 100644 --- a/keyboards/kbdmania/kmac/matrix.c +++ b/keyboards/kbdmania/kmac/matrix.c @@ -112,7 +112,7 @@ static void select_col(uint8_t col) { writePin(F1, c & 0b00010); writePin(F0, c & 0b00001); } else { - writePinHigh(B5); + gpio_write_pin_high(B5); } } diff --git a/keyboards/kbdmania/kmac_pad/matrix.c b/keyboards/kbdmania/kmac_pad/matrix.c index 48f803dc87c..eb9ae8af89a 100644 --- a/keyboards/kbdmania/kmac_pad/matrix.c +++ b/keyboards/kbdmania/kmac_pad/matrix.c @@ -37,7 +37,7 @@ static void unselect_cols(void) { } static void select_col(uint8_t col) { - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { diff --git a/keyboards/keychron/c2_pro/matrix.c b/keyboards/keychron/c2_pro/matrix.c index e6510addb31..cf6d43fed38 100644 --- a/keyboards/keychron/c2_pro/matrix.c +++ b/keyboards/keychron/c2_pro/matrix.c @@ -49,7 +49,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -79,11 +79,11 @@ static void HC595_output(SIZE_T data, uint8_t bit) { ATOMIC_BLOCK_FORCEON { for (uint8_t i = 0; i < (SHIFT_COL_END - SHIFT_COL_START + 1); i++) { if (data & 0x1) { - writePinHigh(HC595_DS); + gpio_write_pin_high(HC595_DS); } else { writePinLow(HC595_DS); } - writePinHigh(HC595_SHCP); + gpio_write_pin_high(HC595_SHCP); HC595_delay(n); writePinLow(HC595_SHCP); HC595_delay(n); @@ -93,7 +93,7 @@ static void HC595_output(SIZE_T data, uint8_t bit) { data = data >> 1; } } - writePinHigh(HC595_STCP); + gpio_write_pin_high(HC595_STCP); HC595_delay(n); writePinLow(HC595_STCP); HC595_delay(n); diff --git a/keyboards/keychron/q10/matrix.c b/keyboards/keychron/q10/matrix.c index d2d84461bdd..c7c4b749785 100644 --- a/keyboards/keychron/q10/matrix.c +++ b/keyboards/keychron/q10/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/keychron/q11/q11.c b/keyboards/keychron/q11/q11.c index f643113ea3b..0fdbcf5f331 100755 --- a/keyboards/keychron/q11/q11.c +++ b/keyboards/keychron/q11/q11.c @@ -131,7 +131,7 @@ void keyboard_post_init_kb(void) { // to avoid affecting the serial usart communication between the left hand and the right hand. if (is_keyboard_left()) { setPinOutput(A0); - writePinHigh(A0); + gpio_write_pin_high(A0); } else { if ((analogReadPin_my(B0) > 1000) || (analogReadPin_my(B1) > 1000)) { setPinInput(A11); diff --git a/keyboards/keychron/q12/matrix.c b/keyboards/keychron/q12/matrix.c index fd8975fb3ae..d43854604de 100644 --- a/keyboards/keychron/q12/matrix.c +++ b/keyboards/keychron/q12/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/keychron/q1v2/matrix.c b/keyboards/keychron/q1v2/matrix.c index 98a888e9b26..09eeeb3a1d7 100644 --- a/keyboards/keychron/q1v2/matrix.c +++ b/keyboards/keychron/q1v2/matrix.c @@ -42,7 +42,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/keychron/q3/matrix.c b/keyboards/keychron/q3/matrix.c index 1dcda87b948..d26859c8b99 100644 --- a/keyboards/keychron/q3/matrix.c +++ b/keyboards/keychron/q3/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/keychron/q5/matrix.c b/keyboards/keychron/q5/matrix.c index 32f8eeeb3a6..c6750177129 100644 --- a/keyboards/keychron/q5/matrix.c +++ b/keyboards/keychron/q5/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/keychron/q6/matrix.c b/keyboards/keychron/q6/matrix.c index 85071d4525a..0c4a1b2312f 100644 --- a/keyboards/keychron/q6/matrix.c +++ b/keyboards/keychron/q6/matrix.c @@ -55,7 +55,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/keychron/q65/matrix.c b/keyboards/keychron/q65/matrix.c index 05e2c6ef48e..a2781ac5e14 100644 --- a/keyboards/keychron/q65/matrix.c +++ b/keyboards/keychron/q65/matrix.c @@ -41,7 +41,7 @@ static inline void writePinLow_atomic(pin_t pin) { static inline void writePinHigh_atomic(pin_t pin) { ATOMIC_BLOCK_FORCEON { - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -75,18 +75,18 @@ static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { compiler_barrier(); if (dataOut & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } dataOut = dataOut >> 1; compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); } compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); @@ -97,16 +97,16 @@ static void shiftout_single(uint8_t data) { ATOMIC_BLOCK_FORCEON { compiler_barrier(); if (data & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); diff --git a/keyboards/keychron/v1/matrix.c b/keyboards/keychron/v1/matrix.c index 55665c8ef42..cb2b1ce18e4 100644 --- a/keyboards/keychron/v1/matrix.c +++ b/keyboards/keychron/v1/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -70,18 +70,18 @@ static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { compiler_barrier(); if (dataOut & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } dataOut = dataOut >> 1; compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); } compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); @@ -92,16 +92,16 @@ static void shiftOut_single(uint8_t data) { ATOMIC_BLOCK_FORCEON { compiler_barrier(); if (data & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); diff --git a/keyboards/keychron/v10/matrix.c b/keyboards/keychron/v10/matrix.c index b2265d93e98..a975a26d87c 100644 --- a/keyboards/keychron/v10/matrix.c +++ b/keyboards/keychron/v10/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -69,16 +69,16 @@ static void shiftOut(uint16_t dataOut) { ATOMIC_BLOCK_FORCEON { for (uint8_t i = 0; i < PIN_USED_74HC595; i++) { if (dataOut & 0x1) { - writePinHigh(DATA_PIN_74HC595); + gpio_write_pin_high(DATA_PIN_74HC595); } else { writePinLow(DATA_PIN_74HC595); } dataOut = dataOut >> 1; - writePinHigh(CLOCK_PIN_74HC595); + gpio_write_pin_high(CLOCK_PIN_74HC595); small_delay(2); writePinLow(CLOCK_PIN_74HC595); } - writePinHigh(LATCH_PIN_74HC595); + gpio_write_pin_high(LATCH_PIN_74HC595); small_delay(2); writePinLow(LATCH_PIN_74HC595); } @@ -87,14 +87,14 @@ static void shiftOut(uint16_t dataOut) { static void shiftOut_single(uint8_t data) { ATOMIC_BLOCK_FORCEON { if (data & 0x1) { - writePinHigh(DATA_PIN_74HC595); + gpio_write_pin_high(DATA_PIN_74HC595); } else { writePinLow(DATA_PIN_74HC595); } - writePinHigh(CLOCK_PIN_74HC595); + gpio_write_pin_high(CLOCK_PIN_74HC595); small_delay(2); writePinLow(CLOCK_PIN_74HC595); - writePinHigh(LATCH_PIN_74HC595); + gpio_write_pin_high(LATCH_PIN_74HC595); small_delay(2); writePinLow(LATCH_PIN_74HC595); } diff --git a/keyboards/keychron/v3/matrix.c b/keyboards/keychron/v3/matrix.c index 74b751d50fb..43a52b06f5f 100644 --- a/keyboards/keychron/v3/matrix.c +++ b/keyboards/keychron/v3/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -70,18 +70,18 @@ static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { compiler_barrier(); if (dataOut & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } dataOut = dataOut >> 1; compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); } compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); @@ -92,16 +92,16 @@ static void shiftOut_single(uint8_t data) { ATOMIC_BLOCK_FORCEON { compiler_barrier(); if (data & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); diff --git a/keyboards/keychron/v5/matrix.c b/keyboards/keychron/v5/matrix.c index 0f8e1ce0908..a96ad9c35a3 100644 --- a/keyboards/keychron/v5/matrix.c +++ b/keyboards/keychron/v5/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -70,18 +70,18 @@ static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { compiler_barrier(); if (dataOut & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } dataOut = dataOut >> 1; compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); } compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); @@ -92,16 +92,16 @@ static void shiftOut_single(uint8_t data) { ATOMIC_BLOCK_FORCEON { compiler_barrier(); if (data & 0x1) { - writePinHigh(DATA_PIN); + gpio_write_pin_high(DATA_PIN); } else { writePinLow(DATA_PIN); } compiler_barrier(); - writePinHigh(CLOCK_PIN); + gpio_write_pin_high(CLOCK_PIN); small_delay(); writePinLow(CLOCK_PIN); compiler_barrier(); - writePinHigh(LATCH_PIN); + gpio_write_pin_high(LATCH_PIN); small_delay(); writePinLow(LATCH_PIN); compiler_barrier(); diff --git a/keyboards/keychron/v6/matrix.c b/keyboards/keychron/v6/matrix.c index b2265d93e98..a975a26d87c 100644 --- a/keyboards/keychron/v6/matrix.c +++ b/keyboards/keychron/v6/matrix.c @@ -43,7 +43,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } @@ -69,16 +69,16 @@ static void shiftOut(uint16_t dataOut) { ATOMIC_BLOCK_FORCEON { for (uint8_t i = 0; i < PIN_USED_74HC595; i++) { if (dataOut & 0x1) { - writePinHigh(DATA_PIN_74HC595); + gpio_write_pin_high(DATA_PIN_74HC595); } else { writePinLow(DATA_PIN_74HC595); } dataOut = dataOut >> 1; - writePinHigh(CLOCK_PIN_74HC595); + gpio_write_pin_high(CLOCK_PIN_74HC595); small_delay(2); writePinLow(CLOCK_PIN_74HC595); } - writePinHigh(LATCH_PIN_74HC595); + gpio_write_pin_high(LATCH_PIN_74HC595); small_delay(2); writePinLow(LATCH_PIN_74HC595); } @@ -87,14 +87,14 @@ static void shiftOut(uint16_t dataOut) { static void shiftOut_single(uint8_t data) { ATOMIC_BLOCK_FORCEON { if (data & 0x1) { - writePinHigh(DATA_PIN_74HC595); + gpio_write_pin_high(DATA_PIN_74HC595); } else { writePinLow(DATA_PIN_74HC595); } - writePinHigh(CLOCK_PIN_74HC595); + gpio_write_pin_high(CLOCK_PIN_74HC595); small_delay(2); writePinLow(CLOCK_PIN_74HC595); - writePinHigh(LATCH_PIN_74HC595); + gpio_write_pin_high(LATCH_PIN_74HC595); small_delay(2); writePinLow(LATCH_PIN_74HC595); } diff --git a/keyboards/keyhive/honeycomb/honeycomb.c b/keyboards/keyhive/honeycomb/honeycomb.c index 6acc649e0d9..5e99ddb85ae 100755 --- a/keyboards/keyhive/honeycomb/honeycomb.c +++ b/keyboards/keyhive/honeycomb/honeycomb.c @@ -61,11 +61,11 @@ bool pointing_device_task(void){ void led_init(void) { setPinOutput(D1); - writePinHigh(D1); + gpio_write_pin_high(D1); setPinOutput(F4); - writePinHigh(F4); + gpio_write_pin_high(F4); setPinOutput(F5); - writePinHigh(F5); + gpio_write_pin_high(F5); } void matrix_init_kb(void) { diff --git a/keyboards/keyhive/honeycomb/honeycomb.h b/keyboards/keyhive/honeycomb/honeycomb.h index 0418dee767d..39dbfa22215 100755 --- a/keyboards/keyhive/honeycomb/honeycomb.h +++ b/keyboards/keyhive/honeycomb/honeycomb.h @@ -2,11 +2,11 @@ #include "quantum.h" -#define RED_LED_OFF() writePinHigh(F6) +#define RED_LED_OFF() gpio_write_pin_high(F6) #define RED_LED_ON() writePinLow(F6) -#define BLU_LED_OFF() writePinHigh(F5) +#define BLU_LED_OFF() gpio_write_pin_high(F5) #define BLU_LED_ON() writePinLow(F5) -#define GRN_LED_OFF() writePinHigh(D1) +#define GRN_LED_OFF() gpio_write_pin_high(D1) #define GRN_LED_ON() writePinLow(D1) #define SET_LED_OFF (RED_LED_OFF(); GRN_LED_OFF(); BLU_LED_OFF(); ) diff --git a/keyboards/keyhive/navi10/rev0/rev0.c b/keyboards/keyhive/navi10/rev0/rev0.c index 1eefa5cd913..5cf04801fc6 100644 --- a/keyboards/keyhive/navi10/rev0/rev0.c +++ b/keyboards/keyhive/navi10/rev0/rev0.c @@ -22,7 +22,7 @@ void matrix_init_kb(void) { //set the indicator LED pin to Output setPinOutput(B5); //set HIGH for off. - writePinHigh(B5); + gpio_write_pin_high(B5); //call any user functions matrix_init_user(); diff --git a/keyboards/keyhive/navi10/rev2/rev2.c b/keyboards/keyhive/navi10/rev2/rev2.c index 1eefa5cd913..5cf04801fc6 100644 --- a/keyboards/keyhive/navi10/rev2/rev2.c +++ b/keyboards/keyhive/navi10/rev2/rev2.c @@ -22,7 +22,7 @@ void matrix_init_kb(void) { //set the indicator LED pin to Output setPinOutput(B5); //set HIGH for off. - writePinHigh(B5); + gpio_write_pin_high(B5); //call any user functions matrix_init_user(); diff --git a/keyboards/keyhive/navi10/rev3/rev3.c b/keyboards/keyhive/navi10/rev3/rev3.c index 1eefa5cd913..5cf04801fc6 100644 --- a/keyboards/keyhive/navi10/rev3/rev3.c +++ b/keyboards/keyhive/navi10/rev3/rev3.c @@ -22,7 +22,7 @@ void matrix_init_kb(void) { //set the indicator LED pin to Output setPinOutput(B5); //set HIGH for off. - writePinHigh(B5); + gpio_write_pin_high(B5); //call any user functions matrix_init_user(); diff --git a/keyboards/kinesis/kint36/kint36.c b/keyboards/kinesis/kint36/kint36.c index b3ae9b570c6..d29214da605 100644 --- a/keyboards/kinesis/kint36/kint36.c +++ b/keyboards/kinesis/kint36/kint36.c @@ -23,5 +23,5 @@ void matrix_init_kb(void) { // Turn on the Teensy 3.6 Power LED: setPinOutput(LED_POWER); - writePinHigh(LED_POWER); + gpio_write_pin_high(LED_POWER); } diff --git a/keyboards/kinesis/kint41/kint41.c b/keyboards/kinesis/kint41/kint41.c index 6d339497eed..8cc0f548904 100644 --- a/keyboards/kinesis/kint41/kint41.c +++ b/keyboards/kinesis/kint41/kint41.c @@ -23,7 +23,7 @@ void matrix_init_kb(void) { // Turn on the Teensy 4.x Power LED: setPinOutput(LED_POWER); - writePinHigh(LED_POWER); + gpio_write_pin_high(LED_POWER); } // delay_inline sleeps for |cycles| (e.g. sleeping for F_CPU will sleep 1s). diff --git a/keyboards/kinesis/kintlc/kintlc.c b/keyboards/kinesis/kintlc/kintlc.c index 9623d04fe02..4eecec2ed84 100644 --- a/keyboards/kinesis/kintlc/kintlc.c +++ b/keyboards/kinesis/kintlc/kintlc.c @@ -23,5 +23,5 @@ void matrix_init_kb(void) { // Turn on the Teensy LC Power LED: setPinOutput(LED_POWER); - writePinHigh(LED_POWER); + gpio_write_pin_high(LED_POWER); } diff --git a/keyboards/kinesis/kintwin/kintwin.c b/keyboards/kinesis/kintwin/kintwin.c index 0e2e7a57928..5b0604e9b55 100644 --- a/keyboards/kinesis/kintwin/kintwin.c +++ b/keyboards/kinesis/kintwin/kintwin.c @@ -23,7 +23,7 @@ void matrix_init_kb(void) { setPinOutput(LED_COMPOSE_PIN); writePinLow(LED_COMPOSE_PIN); wait_ms(led_delay_ms); - writePinHigh(LED_COMPOSE_PIN); + gpio_write_pin_high(LED_COMPOSE_PIN); matrix_init_user(); } \ No newline at end of file diff --git a/keyboards/kopibeng/typ65/typ65.c b/keyboards/kopibeng/typ65/typ65.c index 246a8c13af5..d37acebe2ba 100644 --- a/keyboards/kopibeng/typ65/typ65.c +++ b/keyboards/kopibeng/typ65/typ65.c @@ -27,24 +27,24 @@ void keyboard_pre_init_kb (void) { __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(INDICATOR_0); + gpio_write_pin_high(INDICATOR_0); writePinLow(INDICATOR_1); writePinLow(INDICATOR_2); break; case 2: writePinLow(INDICATOR_0); - writePinHigh(INDICATOR_1); + gpio_write_pin_high(INDICATOR_1); writePinLow(INDICATOR_2); break; case 3: writePinLow(INDICATOR_0); writePinLow(INDICATOR_1); - writePinHigh(INDICATOR_2); + gpio_write_pin_high(INDICATOR_2); break; default: - writePinHigh(INDICATOR_0); - writePinHigh(INDICATOR_1); - writePinHigh(INDICATOR_2); + gpio_write_pin_high(INDICATOR_0); + gpio_write_pin_high(INDICATOR_1); + gpio_write_pin_high(INDICATOR_2); break; } return state; @@ -59,9 +59,9 @@ void suspend_power_down_kb(void) { } void suspend_wakeup_init_kb(void) { - writePinHigh(INDICATOR_0); - writePinHigh(INDICATOR_1); - writePinHigh(INDICATOR_2); + gpio_write_pin_high(INDICATOR_0); + gpio_write_pin_high(INDICATOR_1); + gpio_write_pin_high(INDICATOR_2); suspend_wakeup_init_user(); } \ No newline at end of file diff --git a/keyboards/kv/revt/revt.c b/keyboards/kv/revt/revt.c index fba4582c263..8ddfb29403e 100644 --- a/keyboards/kv/revt/revt.c +++ b/keyboards/kv/revt/revt.c @@ -19,7 +19,7 @@ void matrix_init_kb(void) { // Turn status LED on setPinOutput(C14); - writePinHigh(C14); + gpio_write_pin_high(C14); matrix_init_user(); } diff --git a/keyboards/lazydesigners/dimple/staggered/staggered.c b/keyboards/lazydesigners/dimple/staggered/staggered.c index b871868afa7..7e990367b58 100644 --- a/keyboards/lazydesigners/dimple/staggered/staggered.c +++ b/keyboards/lazydesigners/dimple/staggered/staggered.c @@ -19,5 +19,5 @@ void dimple_led_on(void) { } void dimple_led_off(void) { - writePinHigh(E6); + gpio_write_pin_high(E6); } diff --git a/keyboards/lfkeyboards/smk65/revb/revb.c b/keyboards/lfkeyboards/smk65/revb/revb.c index 8eb9b9afe20..31f58d56f10 100644 --- a/keyboards/lfkeyboards/smk65/revb/revb.c +++ b/keyboards/lfkeyboards/smk65/revb/revb.c @@ -28,7 +28,7 @@ void matrix_init_kb(void) // audio_init() sets PB5 to output and drives it low, which breaks our matrix // so reset PB5 to input setPinInput(B5); - writePinHigh(B5); + gpio_write_pin_high(B5); #else // If we're not using the audio pin, drive it low setPinOutput(C6); diff --git a/keyboards/lz/erghost/matrix.c b/keyboards/lz/erghost/matrix.c index 1ab85cff247..9353b751c38 100644 --- a/keyboards/lz/erghost/matrix.c +++ b/keyboards/lz/erghost/matrix.c @@ -66,97 +66,97 @@ static void select_col(uint8_t col) { writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 1: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 2: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 3: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 4: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 5: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 6: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 7: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 8: writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 9: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 10: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 11: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 12: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 13: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 14: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 15: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 16: writePinLow(E6); @@ -167,45 +167,45 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { switch (col) { case 0: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 1: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 2: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 3: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(B0); break; case 4: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 5: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 6: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 7: @@ -215,38 +215,38 @@ static void unselect_col(uint8_t col) { writePinLow(B0); break; case 8: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 9: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; case 10: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 11: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(F1); break; case 12: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 13: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; @@ -259,25 +259,25 @@ static void unselect_col(uint8_t col) { case 15: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 16: - writePinHigh(E6); + gpio_write_pin_high(E6); break; } } static void unselect_cols(void) { //Native - writePinHigh(E6); + gpio_write_pin_high(E6); //Demultiplexer writePinLow(B0); writePinLow(F1); - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); } static void init_pins(void) { diff --git a/keyboards/machkeyboards/mach3/mach3.c b/keyboards/machkeyboards/mach3/mach3.c index 2a417b0a02d..1d178240092 100644 --- a/keyboards/machkeyboards/mach3/mach3.c +++ b/keyboards/machkeyboards/mach3/mach3.c @@ -36,7 +36,7 @@ led_config_t g_led_config = { { void keyboard_pre_init_kb(void) { setPinOutput(F5); - writePinHigh(F5); + gpio_write_pin_high(F5); keyboard_pre_init_user(); } diff --git a/keyboards/makeymakey/makeymakey.c b/keyboards/makeymakey/makeymakey.c index 5b8edd46556..7650d599790 100644 --- a/keyboards/makeymakey/makeymakey.c +++ b/keyboards/makeymakey/makeymakey.c @@ -48,7 +48,7 @@ void cycle_leds(void) { setPinInput(led_pins[0]); writePinLow(led_pins[0]); setPinOutput(led_pins[1]); - writePinHigh(led_pins[1]); + gpio_write_pin_high(led_pins[1]); setPinOutput(led_pins[2]); writePinLow(led_pins[2]); } @@ -56,7 +56,7 @@ void cycle_leds(void) { case 1: if (led_state[1]) { // Down Arrow setPinOutput(led_pins[0]); - writePinHigh(led_pins[0]); + gpio_write_pin_high(led_pins[0]); setPinOutput(led_pins[1]); writePinLow(led_pins[1]); setPinInput(led_pins[2]); @@ -68,7 +68,7 @@ void cycle_leds(void) { setPinOutput(led_pins[0]); writePinLow(led_pins[0]); setPinOutput(led_pins[1]); - writePinHigh(led_pins[1]); + gpio_write_pin_high(led_pins[1]); setPinInput(led_pins[2]); writePinLow(led_pins[2]); } @@ -80,7 +80,7 @@ void cycle_leds(void) { setPinOutput(led_pins[1]); writePinLow(led_pins[1]); setPinOutput(led_pins[2]); - writePinHigh(led_pins[2]); + gpio_write_pin_high(led_pins[2]); } break; case 4: @@ -90,13 +90,13 @@ void cycle_leds(void) { setPinInput(led_pins[1]); writePinLow(led_pins[1]); setPinOutput(led_pins[2]); - writePinHigh(led_pins[2]); + gpio_write_pin_high(led_pins[2]); } break; case 5: if (led_state[5]) { // Right Click setPinOutput(led_pins[0]); - writePinHigh(led_pins[0]); + gpio_write_pin_high(led_pins[0]); setPinInput(led_pins[1]); writePinLow(led_pins[1]); setPinOutput(led_pins[2]); diff --git a/keyboards/mariorion_v25/mariorion_v25.c b/keyboards/mariorion_v25/mariorion_v25.c index 7c57c29dfd1..937b59ff32b 100644 --- a/keyboards/mariorion_v25/mariorion_v25.c +++ b/keyboards/mariorion_v25/mariorion_v25.c @@ -32,24 +32,24 @@ void matrix_init_kb(void) { layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(INDICATOR_0); + gpio_write_pin_high(INDICATOR_0); writePinLow(INDICATOR_1); writePinLow(INDICATOR_2); break; case 2: writePinLow(INDICATOR_0); - writePinHigh(INDICATOR_1); + gpio_write_pin_high(INDICATOR_1); writePinLow(INDICATOR_2); break; case 3: writePinLow(INDICATOR_0); writePinLow(INDICATOR_1); - writePinHigh(INDICATOR_2); + gpio_write_pin_high(INDICATOR_2); break; default: - writePinHigh(INDICATOR_0); - writePinHigh(INDICATOR_1); - writePinHigh(INDICATOR_2); + gpio_write_pin_high(INDICATOR_0); + gpio_write_pin_high(INDICATOR_1); + gpio_write_pin_high(INDICATOR_2); break; } return layer_state_set_user(state); @@ -64,9 +64,9 @@ void suspend_power_down_kb(void) { } void suspend_wakeup_init_kb(void) { - writePinHigh(INDICATOR_0); - writePinHigh(INDICATOR_1); - writePinHigh(INDICATOR_2); + gpio_write_pin_high(INDICATOR_0); + gpio_write_pin_high(INDICATOR_1); + gpio_write_pin_high(INDICATOR_2); suspend_wakeup_init_user(); } diff --git a/keyboards/matrix/falcon/falcon.c b/keyboards/matrix/falcon/falcon.c index 33d05a8a295..acea5e5cf5c 100644 --- a/keyboards/matrix/falcon/falcon.c +++ b/keyboards/matrix/falcon/falcon.c @@ -19,10 +19,10 @@ void matrix_init_kb(void) { // enable charge setPinOutput(CHG_EN_PIN); - writePinHigh(CHG_EN_PIN); + gpio_write_pin_high(CHG_EN_PIN); // enable led power setPinOutput(LED_POWER_PIN); - writePinHigh(LED_POWER_PIN); + gpio_write_pin_high(LED_POWER_PIN); } diff --git a/keyboards/matrix/m12og/rev1/matrix.c b/keyboards/matrix/m12og/rev1/matrix.c index 37e1e8eccfc..b0b4c26293a 100644 --- a/keyboards/matrix/m12og/rev1/matrix.c +++ b/keyboards/matrix/m12og/rev1/matrix.c @@ -26,7 +26,7 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; static void select_col(uint8_t col) { setPinOutput(col_pins[col]); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } static void unselect_col(uint8_t col) { setPinInputLow(col_pins[col]); } diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c b/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c index 56038d2ef4e..7dc51f7ac42 100644 --- a/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c @@ -102,92 +102,92 @@ static void select_col(uint8_t col) { case 0: writePinLow(F4); writePinLow(F1); - writePinHigh(F0); - writePinHigh(F5); + gpio_write_pin_high(F0); + gpio_write_pin_high(F5); break; case 1: writePinLow(F4); - writePinHigh(F1); + gpio_write_pin_high(F1); writePinLow(F0); - writePinHigh(F5); + gpio_write_pin_high(F5); break; case 2: writePinLow(F4); - writePinHigh(F1); - writePinHigh(F0); - writePinHigh(F5); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F5); break; case 3: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); writePinLow(F0); - writePinHigh(F5); + gpio_write_pin_high(F5); break; case 4: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); - writePinHigh(F0); - writePinHigh(F5); + gpio_write_pin_high(F0); + gpio_write_pin_high(F5); break; case 5: - writePinHigh(F4); - writePinHigh(F1); - writePinHigh(F0); - writePinHigh(F5); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F5); break; case 6: - writePinHigh(F4); - writePinHigh(F1); - writePinHigh(F0); - writePinHigh(F6); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F6); break; case 7: writePinLow(F4); writePinLow(F1); writePinLow(F0); - writePinHigh(F6); + gpio_write_pin_high(F6); break; case 8: writePinLow(F4); writePinLow(F1); - writePinHigh(F0); - writePinHigh(F6); + gpio_write_pin_high(F0); + gpio_write_pin_high(F6); break; case 9: writePinLow(F4); - writePinHigh(F1); + gpio_write_pin_high(F1); writePinLow(F0); - writePinHigh(F6); + gpio_write_pin_high(F6); break; case 10: writePinLow(F4); - writePinHigh(F1); - writePinHigh(F0); - writePinHigh(F6); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F6); break; case 11: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); writePinLow(F0); - writePinHigh(F6); + gpio_write_pin_high(F6); break; case 12: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); - writePinHigh(F0); - writePinHigh(F6); + gpio_write_pin_high(F0); + gpio_write_pin_high(F6); break; case 13: - writePinHigh(F4); - writePinHigh(F1); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); writePinLow(F0); - writePinHigh(F6); + gpio_write_pin_high(F6); break; case 14: writePinLow(F4); writePinLow(F1); writePinLow(F0); - writePinHigh(F5); + gpio_write_pin_high(F5); break; } } @@ -195,32 +195,32 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { switch (col) { case 0: - writePinHigh(F4); - writePinHigh(F1); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); writePinLow(F0); writePinLow(F5); break; case 1: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F5); break; case 2: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); writePinLow(F0); writePinLow(F5); break; case 3: writePinLow(F4); - writePinHigh(F1); - writePinHigh(F0); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); writePinLow(F5); break; case 4: writePinLow(F4); - writePinHigh(F1); + gpio_write_pin_high(F1); writePinLow(F0); writePinLow(F5); break; @@ -237,51 +237,51 @@ static void unselect_col(uint8_t col) { writePinLow(F6); break; case 7: - writePinHigh(F4); - writePinHigh(F1); - writePinHigh(F0); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); writePinLow(F6); break; case 8: - writePinHigh(F4); - writePinHigh(F1); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); writePinLow(F0); writePinLow(F6); break; case 9: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F6); break; case 10: - writePinHigh(F4); + gpio_write_pin_high(F4); writePinLow(F1); writePinLow(F0); writePinLow(F6); break; case 11: writePinLow(F4); - writePinHigh(F1); - writePinHigh(F0); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); writePinLow(F6); break; case 12: writePinLow(F4); - writePinHigh(F1); + gpio_write_pin_high(F1); writePinLow(F0); writePinLow(F6); break; case 13: writePinLow(F4); writePinLow(F1); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F6); break; case 14: - writePinHigh(F4); - writePinHigh(F1); - writePinHigh(F0); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); + gpio_write_pin_high(F0); writePinLow(F5); break; } @@ -290,9 +290,9 @@ static void unselect_col(uint8_t col) { static void unselect_cols(void) { //Demultiplexer - writePinHigh(F0); - writePinHigh(F1); - writePinHigh(F4); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); + gpio_write_pin_high(F4); writePinLow(F5); writePinLow(F6); } diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 0208e163482..18b680d16cb 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -35,20 +35,20 @@ layer_state_t layer_state_set_user(layer_state_t state) { // if on layer 1, turn on D2 LED, otherwise off. if (get_highest_layer(state) == 1) { - writePinHigh(D2); + gpio_write_pin_high(D2); } else { writePinLow(D2); } // if on layer 2, turn on D1 LED, otherwise off. if (get_highest_layer(state) == 2) { - writePinHigh(D1); + gpio_write_pin_high(D1); } else { writePinLow(D1); } // if on layer 3, turn on D0 LED, otherwise off. if (get_highest_layer(state) == 3) { - writePinHigh(D0); + gpio_write_pin_high(D0); } else { writePinLow(D0); } diff --git a/keyboards/mechlovin/infinity87/rev2/matrix.c b/keyboards/mechlovin/infinity87/rev2/matrix.c index 810d493181b..ef6c2c694db 100644 --- a/keyboards/mechlovin/infinity87/rev2/matrix.c +++ b/keyboards/mechlovin/infinity87/rev2/matrix.c @@ -107,97 +107,97 @@ static void select_col(uint8_t col) { writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 1: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 2: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 3: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 4: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 5: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 6: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 7: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 8: writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 9: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 10: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 11: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 12: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 13: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 14: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 15: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 16: writePinLow(E6); @@ -208,45 +208,45 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { switch (col) { case 0: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 1: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 2: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 3: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(B0); break; case 4: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 5: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 6: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 7: @@ -256,38 +256,38 @@ static void unselect_col(uint8_t col) { writePinLow(B0); break; case 8: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 9: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; case 10: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 11: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(F1); break; case 12: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 13: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; @@ -300,25 +300,25 @@ static void unselect_col(uint8_t col) { case 15: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 16: - writePinHigh(E6); + gpio_write_pin_high(E6); break; } } static void unselect_cols(void) { //Native - writePinHigh(E6); + gpio_write_pin_high(E6); //Demultiplexer writePinLow(B0); writePinLow(F1); - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); } static void init_pins(void) { diff --git a/keyboards/mechlovin/infinity875/matrix.c b/keyboards/mechlovin/infinity875/matrix.c index 810d493181b..ef6c2c694db 100644 --- a/keyboards/mechlovin/infinity875/matrix.c +++ b/keyboards/mechlovin/infinity875/matrix.c @@ -107,97 +107,97 @@ static void select_col(uint8_t col) { writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 1: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 2: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 3: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 4: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 5: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 6: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 7: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 8: writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 9: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 10: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 11: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 12: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 13: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 14: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 15: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 16: writePinLow(E6); @@ -208,45 +208,45 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { switch (col) { case 0: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 1: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 2: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 3: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(B0); break; case 4: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 5: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 6: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 7: @@ -256,38 +256,38 @@ static void unselect_col(uint8_t col) { writePinLow(B0); break; case 8: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 9: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; case 10: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 11: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(F1); break; case 12: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 13: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; @@ -300,25 +300,25 @@ static void unselect_col(uint8_t col) { case 15: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 16: - writePinHigh(E6); + gpio_write_pin_high(E6); break; } } static void unselect_cols(void) { //Native - writePinHigh(E6); + gpio_write_pin_high(E6); //Demultiplexer writePinLow(B0); writePinLow(F1); - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); } static void init_pins(void) { diff --git a/keyboards/mechlovin/olly/bb/matrix.c b/keyboards/mechlovin/olly/bb/matrix.c index 1a698a66a5c..a34268a446e 100644 --- a/keyboards/mechlovin/olly/bb/matrix.c +++ b/keyboards/mechlovin/olly/bb/matrix.c @@ -70,97 +70,97 @@ static void select_col(uint8_t col) { writePinLow(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 1: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 2: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 3: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 4: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 5: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 6: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 7: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 8: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 9: writePinLow(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 10: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 11: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 12: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 13: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 14: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 15: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 16: writePinLow(C2); @@ -177,45 +177,45 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { switch (col) { case 0: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(B4); break; case 1: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(B4); break; case 2: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(B4); break; case 3: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); writePinLow(B4); break; case 4: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(B4); break; case 5: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(B4); break; case 6: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(B4); break; case 7: @@ -231,71 +231,71 @@ static void unselect_col(uint8_t col) { writePinLow(C7); break; case 9: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(C7); break; case 10: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(C7); break; case 11: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(C7); break; case 12: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); writePinLow(C7); break; case 13: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(C7); break; case 14: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(C7); break; case 15: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(C7); break; case 16: - writePinHigh(C2); + gpio_write_pin_high(C2); break; case 17: - writePinHigh(C3); + gpio_write_pin_high(C3); break; case 18: - writePinHigh(C5); + gpio_write_pin_high(C5); break; } } static void unselect_cols(void) { //Native - writePinHigh(C2); - writePinHigh(C3); - writePinHigh(C5); + gpio_write_pin_high(C2); + gpio_write_pin_high(C3); + gpio_write_pin_high(C5); //Demultiplexer writePinLow(B4); writePinLow(C7); - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); } static void init_pins(void) { diff --git a/keyboards/mechlovin/olly/jf/rev1/matrix.c b/keyboards/mechlovin/olly/jf/rev1/matrix.c index 91f277fd442..5f8290b7555 100644 --- a/keyboards/mechlovin/olly/jf/rev1/matrix.c +++ b/keyboards/mechlovin/olly/jf/rev1/matrix.c @@ -160,97 +160,97 @@ static void select_col(uint8_t col) { writePinLow(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 1: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 2: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 3: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 4: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 5: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 6: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(B4); + gpio_write_pin_high(B4); break; case 7: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(B4); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(B4); break; case 8: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 9: writePinLow(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 10: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 11: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 12: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 13: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 14: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); - writePinHigh(C7); + gpio_write_pin_high(A2); + gpio_write_pin_high(C7); break; case 15: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); - writePinHigh(C7); + gpio_write_pin_high(C7); break; case 16: writePinLow(C2); @@ -267,45 +267,45 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { switch (col) { case 0: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(B4); break; case 1: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(B4); break; case 2: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(B4); break; case 3: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); writePinLow(B4); break; case 4: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(B4); break; case 5: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(B4); break; case 6: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(B4); break; case 7: @@ -321,71 +321,71 @@ static void unselect_col(uint8_t col) { writePinLow(C7); break; case 9: - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(C7); break; case 10: - writePinHigh(A0); - writePinHigh(A1); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(C7); break; case 11: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(C7); break; case 12: - writePinHigh(A0); + gpio_write_pin_high(A0); writePinLow(A1); writePinLow(A2); writePinLow(C7); break; case 13: writePinLow(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); writePinLow(C7); break; case 14: writePinLow(A0); - writePinHigh(A1); + gpio_write_pin_high(A1); writePinLow(A2); writePinLow(C7); break; case 15: writePinLow(A0); writePinLow(A1); - writePinHigh(A2); + gpio_write_pin_high(A2); writePinLow(C7); break; case 16: - writePinHigh(C2); + gpio_write_pin_high(C2); break; case 17: - writePinHigh(C3); + gpio_write_pin_high(C3); break; case 18: - writePinHigh(C5); + gpio_write_pin_high(C5); break; } } static void unselect_cols(void) { //Native - writePinHigh(C2); - writePinHigh(C3); - writePinHigh(C5); + gpio_write_pin_high(C2); + gpio_write_pin_high(C3); + gpio_write_pin_high(C5); //Demultiplexer writePinLow(B4); writePinLow(C7); - writePinHigh(A0); - writePinHigh(A1); - writePinHigh(A2); + gpio_write_pin_high(A0); + gpio_write_pin_high(A1); + gpio_write_pin_high(A2); } static void init_pins(void) { diff --git a/keyboards/mechlovin/serratus/matrix.c b/keyboards/mechlovin/serratus/matrix.c index 810d493181b..ef6c2c694db 100644 --- a/keyboards/mechlovin/serratus/matrix.c +++ b/keyboards/mechlovin/serratus/matrix.c @@ -107,97 +107,97 @@ static void select_col(uint8_t col) { writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 1: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 2: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 3: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 4: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 5: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 6: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 7: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(B0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(B0); break; case 8: writePinLow(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 9: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 10: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 11: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 12: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 13: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 14: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); - writePinHigh(F1); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); + gpio_write_pin_high(F1); break; case 15: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); - writePinHigh(F1); + gpio_write_pin_high(F1); break; case 16: writePinLow(E6); @@ -208,45 +208,45 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { switch (col) { case 0: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 1: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 2: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 3: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(B0); break; case 4: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(B0); break; case 5: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(B0); break; case 6: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(B0); break; case 7: @@ -256,38 +256,38 @@ static void unselect_col(uint8_t col) { writePinLow(B0); break; case 8: - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 9: - writePinHigh(B5); - writePinHigh(B7); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; case 10: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 11: - writePinHigh(B5); + gpio_write_pin_high(B5); writePinLow(B7); writePinLow(F0); writePinLow(F1); break; case 12: writePinLow(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); writePinLow(F1); break; case 13: writePinLow(B5); - writePinHigh(B7); + gpio_write_pin_high(B7); writePinLow(F0); writePinLow(F1); break; @@ -300,25 +300,25 @@ static void unselect_col(uint8_t col) { case 15: writePinLow(B5); writePinLow(B7); - writePinHigh(F0); + gpio_write_pin_high(F0); writePinLow(F1); break; case 16: - writePinHigh(E6); + gpio_write_pin_high(E6); break; } } static void unselect_cols(void) { //Native - writePinHigh(E6); + gpio_write_pin_high(E6); //Demultiplexer writePinLow(B0); writePinLow(F1); - writePinHigh(B5); - writePinHigh(B7); - writePinHigh(F0); + gpio_write_pin_high(B5); + gpio_write_pin_high(B7); + gpio_write_pin_high(F0); } static void init_pins(void) { diff --git a/keyboards/miiiw/blackio83/blackio83.c b/keyboards/miiiw/blackio83/blackio83.c index 6d7cbfd3121..ca52b322126 100644 --- a/keyboards/miiiw/blackio83/blackio83.c +++ b/keyboards/miiiw/blackio83/blackio83.c @@ -50,7 +50,7 @@ void ws2812_poweron(void) { p_setup = true; s_init = false; setPinOutput(RGB_EN_PIN); - writePinHigh(RGB_EN_PIN); + gpio_write_pin_high(RGB_EN_PIN); } void ws2812_poweroff(void) { @@ -67,7 +67,7 @@ void keyboard_pre_init_kb() { setPinOutput(MWPROTO_WAKEUP_PIN); writePinLow(MWPROTO_WAKEUP_PIN); wait_ms(2); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); palSetLineMode(MWPROTO_TX_PIN, PAL_MODE_ALTERNATE(MWPROTO_TX_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); sdStart(&MWPROTO_DRIVER, &mwproto_uart_config); @@ -91,7 +91,7 @@ void keyboard_post_init_kb(void) { sdPutI(&MWPROTO_DRIVER, 0x01); sdPutI(&MWPROTO_DRIVER, 0x02); sdPutI(&MWPROTO_DRIVER, 0xB4); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); ws2812_poweron(); loop10hz_token = defer_exec(LOOP_10HZ_PERIOD, loop_10Hz, NULL); @@ -141,7 +141,7 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) { sdPutI(&MWPROTO_DRIVER, 0x28); sdPutI(&MWPROTO_DRIVER, 0x00); sdPutI(&MWPROTO_DRIVER, 0x8D); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); } } @@ -161,7 +161,7 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) { sdPutI(&MWPROTO_DRIVER, 0x01); sdPutI(&MWPROTO_DRIVER, 0x0F); sdPutI(&MWPROTO_DRIVER, 0xB4); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); wait_ms(50); eeconfig_init(); #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/miiiw/blackio83/matrix.c b/keyboards/miiiw/blackio83/matrix.c index b83233a4f3d..7ce3af2b226 100644 --- a/keyboards/miiiw/blackio83/matrix.c +++ b/keyboards/miiiw/blackio83/matrix.c @@ -108,7 +108,7 @@ static void init_cols(void) { static void select_col(uint8_t col) { if(col_pins[col] < H0){ - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); waitInputPinDelay(); waitInputPinDelay(); waitInputPinDelay(); @@ -133,7 +133,7 @@ static void unselect_cols(void) { for(uint8_t col = 0; col < MATRIX_COLS; col++) { if(col_pins[col] < H0) { setPinOutput(col_pins[col]); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } } } diff --git a/keyboards/miiiw/common/shift_register.c b/keyboards/miiiw/common/shift_register.c index 1f21c124683..96671ea85b9 100644 --- a/keyboards/miiiw/common/shift_register.c +++ b/keyboards/miiiw/common/shift_register.c @@ -24,7 +24,7 @@ static uint8_t shift_values[SHR_SERIES_NUM] = {0}; void shift_init(void) { #ifdef SHR_OE_PIN setPinOutput(SHR_OE_PIN); - writePinHigh(SHR_OE_PIN); + gpio_write_pin_high(SHR_OE_PIN); #endif setPinOutput(SHR_DATA_PIN); setPinOutput(SHR_LATCH_PIN); @@ -42,7 +42,7 @@ void shift_enable(void) { void shift_disable(void) { #ifdef SHR_OE_PIN - writePinHigh(SHR_OE_PIN); + gpio_write_pin_high(SHR_OE_PIN); #endif writePinLow(SHR_DATA_PIN); writePinLow(SHR_LATCH_PIN); @@ -83,8 +83,8 @@ static void shift_out(void) { for (uint8_t i = 0; i < 8; i++) { writePinLow(SHR_CLOCK_PIN); writePin(SHR_DATA_PIN, shift_values[n] & (0x80 >> i)); - writePinHigh(SHR_CLOCK_PIN); + gpio_write_pin_high(SHR_CLOCK_PIN); } } - writePinHigh(SHR_LATCH_PIN); + gpio_write_pin_high(SHR_LATCH_PIN); } diff --git a/keyboards/monstargear/xo87/solderable/solderable.c b/keyboards/monstargear/xo87/solderable/solderable.c index f1fc65ea011..b37029fabe3 100644 --- a/keyboards/monstargear/xo87/solderable/solderable.c +++ b/keyboards/monstargear/xo87/solderable/solderable.c @@ -55,20 +55,20 @@ void backlight_task(void) { // This is a temporary workaround to get the status LEDs working until we can figure out the LED matrix led_t host_leds = host_keyboard_led_state(); if (host_leds.scroll_lock) { - writePinHigh(Lcom3); - writePinHigh(Lseg5); + gpio_write_pin_high(Lcom3); + gpio_write_pin_high(Lseg5); } else { writePinLow(Lcom3); } if (host_leds.num_lock) { - writePinHigh(Lcom7); - writePinHigh(Lseg5); + gpio_write_pin_high(Lcom7); + gpio_write_pin_high(Lseg5); } else { writePinLow(Lcom7); } if (host_leds.caps_lock) { - writePinHigh(Lcom8); - writePinHigh(Lseg5); + gpio_write_pin_high(Lcom8); + gpio_write_pin_high(Lseg5); } else { writePinLow(Lcom8); } diff --git a/keyboards/nopunin10did/kastenwagen1840/kastenwagen1840.c b/keyboards/nopunin10did/kastenwagen1840/kastenwagen1840.c index 01eb8f39034..ddcd2e89e2f 100644 --- a/keyboards/nopunin10did/kastenwagen1840/kastenwagen1840.c +++ b/keyboards/nopunin10did/kastenwagen1840/kastenwagen1840.c @@ -26,9 +26,9 @@ void keyboard_pre_init_kb(void) { } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePinHigh(LED_INDICATOR_TOP); - writePinHigh(LED_INDICATOR_MID); - writePinHigh(LED_INDICATOR_BOT); + gpio_write_pin_high(LED_INDICATOR_TOP); + gpio_write_pin_high(LED_INDICATOR_MID); + gpio_write_pin_high(LED_INDICATOR_BOT); switch(get_highest_layer(state) % 4) { case 1: diff --git a/keyboards/nopunin10did/kastenwagen48/kastenwagen48.c b/keyboards/nopunin10did/kastenwagen48/kastenwagen48.c index 01eb8f39034..ddcd2e89e2f 100644 --- a/keyboards/nopunin10did/kastenwagen48/kastenwagen48.c +++ b/keyboards/nopunin10did/kastenwagen48/kastenwagen48.c @@ -26,9 +26,9 @@ void keyboard_pre_init_kb(void) { } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePinHigh(LED_INDICATOR_TOP); - writePinHigh(LED_INDICATOR_MID); - writePinHigh(LED_INDICATOR_BOT); + gpio_write_pin_high(LED_INDICATOR_TOP); + gpio_write_pin_high(LED_INDICATOR_MID); + gpio_write_pin_high(LED_INDICATOR_BOT); switch(get_highest_layer(state) % 4) { case 1: diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c index e5beff54a30..0a975db381e 100644 --- a/keyboards/percent/canoe_gen2/canoe_gen2.c +++ b/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -19,7 +19,7 @@ along with this program. If not, see . void keyboard_pre_init_kb(void) { setPinOutput(E6); - writePinHigh(E6); + gpio_write_pin_high(E6); } bool led_update_kb(led_t led_state) { diff --git a/keyboards/pica40/rev2/rev2.c b/keyboards/pica40/rev2/rev2.c index 7bf4707ca32..f8c8548e42c 100644 --- a/keyboards/pica40/rev2/rev2.c +++ b/keyboards/pica40/rev2/rev2.c @@ -113,7 +113,7 @@ void housekeeping_task_kb(void) { should_set_rgblight = true; if (is_layer_active) { - writePinHigh(PICA40_RGB_POWER_PIN); + gpio_write_pin_high(PICA40_RGB_POWER_PIN); } else { writePinLow(PICA40_RGB_POWER_PIN); } diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index 660be55babe..c1202c0d457 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -5,7 +5,7 @@ void matrix_init_kb(void) { // Turn status LED on, with the exception of THK #if defined(__AVR_ATmega32U4__) setPinOutput(E6); - writePinHigh(E6); + gpio_write_pin_high(E6); #endif matrix_init_user(); diff --git a/keyboards/planck/rev6_drop/matrix.c b/keyboards/planck/rev6_drop/matrix.c index 34bdcc3f04d..e7156b18081 100644 --- a/keyboards/planck/rev6_drop/matrix.c +++ b/keyboards/planck/rev6_drop/matrix.c @@ -44,7 +44,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { matrix_row_t data = 0; // strobe col - writePinHigh(matrix_col_pins[col]); + gpio_write_pin_high(matrix_col_pins[col]); // need wait to settle pin state wait_us(20); diff --git a/keyboards/planck/rev7/matrix.c b/keyboards/planck/rev7/matrix.c index 1085480802e..9ce1c7cd0d6 100644 --- a/keyboards/planck/rev7/matrix.c +++ b/keyboards/planck/rev7/matrix.c @@ -82,7 +82,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { matrix_row_t data = 0; // strobe col - writePinHigh(matrix_col_pins[col]); + gpio_write_pin_high(matrix_col_pins[col]); // need wait to settle pin state wait_us(20); diff --git a/keyboards/preonic/rev1/rev1.c b/keyboards/preonic/rev1/rev1.c index eed51f2d845..3835879f6ed 100644 --- a/keyboards/preonic/rev1/rev1.c +++ b/keyboards/preonic/rev1/rev1.c @@ -19,7 +19,7 @@ void matrix_init_kb(void) { // Turn status LED on setPinOutput(E6); - writePinHigh(E6); + gpio_write_pin_high(E6); matrix_init_user(); }; diff --git a/keyboards/preonic/rev2/rev2.c b/keyboards/preonic/rev2/rev2.c index eed51f2d845..3835879f6ed 100644 --- a/keyboards/preonic/rev2/rev2.c +++ b/keyboards/preonic/rev2/rev2.c @@ -19,7 +19,7 @@ void matrix_init_kb(void) { // Turn status LED on setPinOutput(E6); - writePinHigh(E6); + gpio_write_pin_high(E6); matrix_init_user(); }; diff --git a/keyboards/redox/wireless/wireless.c b/keyboards/redox/wireless/wireless.c index 30cefd9f4ea..3c50acc8024 100644 --- a/keyboards/redox/wireless/wireless.c +++ b/keyboards/redox/wireless/wireless.c @@ -23,10 +23,10 @@ void led_init(void) { setPinOutput(F4); setPinOutput(F5); - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(F4); - writePinHigh(F5); + gpio_write_pin_high(D0); + gpio_write_pin_high(D1); + gpio_write_pin_high(F4); + gpio_write_pin_high(F5); } diff --git a/keyboards/redox/wireless/wireless.h b/keyboards/redox/wireless/wireless.h index a0ba09aff31..e6e454b6eb6 100644 --- a/keyboards/redox/wireless/wireless.h +++ b/keyboards/redox/wireless/wireless.h @@ -19,13 +19,13 @@ along with this program. If not, see . #include "quantum.h" -#define red_led_off writePinHigh(F5) +#define red_led_off gpio_write_pin_high(F5) #define red_led_on writePinLow(F5) -#define blu_led_off writePinHigh(F4) +#define blu_led_off gpio_write_pin_high(F4) #define blu_led_on writePinLow(F4) -#define grn_led_off writePinHigh(D1) +#define grn_led_off gpio_write_pin_high(D1) #define grn_led_on writePinLow(D1) -#define wht_led_off writePinHigh(D0) +#define wht_led_off gpio_write_pin_high(D0) #define wht_led_on writePinLow(D0) #define set_led_off red_led_off; grn_led_off; blu_led_off; wht_led_off diff --git a/keyboards/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c index fac3e245fb7..c5e7c0898ce 100644 --- a/keyboards/redscarf_i/redscarf_i.c +++ b/keyboards/redscarf_i/redscarf_i.c @@ -22,9 +22,9 @@ void keyboard_pre_init_kb(void) { setPinOutput(F6); setPinOutput(F5); // and then turn them off - writePinHigh(F7); - writePinHigh(F6); - writePinHigh(F5); + gpio_write_pin_high(F7); + gpio_write_pin_high(F6); + gpio_write_pin_high(F5); } bool led_update_kb(led_t led_state) { @@ -38,16 +38,16 @@ bool led_update_kb(led_t led_state) { layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(F6); + gpio_write_pin_high(F6); writePinLow(F5); break; case 2: writePinLow(F6); - writePinHigh(F5); + gpio_write_pin_high(F5); break; default: - writePinHigh(F6); - writePinHigh(F5); + gpio_write_pin_high(F6); + gpio_write_pin_high(F5); break; } return state; diff --git a/keyboards/redscarf_iiplus/verb/matrix.c b/keyboards/redscarf_iiplus/verb/matrix.c index 43ab9d39a03..ac4e48031c8 100755 --- a/keyboards/redscarf_iiplus/verb/matrix.c +++ b/keyboards/redscarf_iiplus/verb/matrix.c @@ -182,27 +182,27 @@ static void unselect_row(uint8_t col) { switch (col) { case 0: - writePinHigh(B0); - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); break; case 1: - writePinHigh(B0); - writePinHigh(B1); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); break; case 2: - writePinHigh(B0); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B2); break; case 3: - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 4: - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); break; case 5: - writePinHigh(B1); + gpio_write_pin_high(B1); break; } } @@ -213,9 +213,9 @@ static void unselect_rows(void) setPinOutput(B1); setPinOutput(B2); // make all pins high to select Y7, nothing is connected to that (otherwise the first row will act weird) - writePinHigh(B0); - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); } static void init_pins(void) { diff --git a/keyboards/redscarf_iiplus/verc/matrix.c b/keyboards/redscarf_iiplus/verc/matrix.c index 43ab9d39a03..ac4e48031c8 100755 --- a/keyboards/redscarf_iiplus/verc/matrix.c +++ b/keyboards/redscarf_iiplus/verc/matrix.c @@ -182,27 +182,27 @@ static void unselect_row(uint8_t col) { switch (col) { case 0: - writePinHigh(B0); - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); break; case 1: - writePinHigh(B0); - writePinHigh(B1); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); break; case 2: - writePinHigh(B0); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B2); break; case 3: - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 4: - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); break; case 5: - writePinHigh(B1); + gpio_write_pin_high(B1); break; } } @@ -213,9 +213,9 @@ static void unselect_rows(void) setPinOutput(B1); setPinOutput(B2); // make all pins high to select Y7, nothing is connected to that (otherwise the first row will act weird) - writePinHigh(B0); - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); } static void init_pins(void) { diff --git a/keyboards/redscarf_iiplus/verd/matrix.c b/keyboards/redscarf_iiplus/verd/matrix.c index 7f0ad17b4d3..9b18d9a75e4 100644 --- a/keyboards/redscarf_iiplus/verd/matrix.c +++ b/keyboards/redscarf_iiplus/verd/matrix.c @@ -182,27 +182,27 @@ static void unselect_row(uint8_t col) { switch (col) { case 0: - writePinHigh(B0); - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); break; case 1: - writePinHigh(B0); - writePinHigh(B1); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); break; case 2: - writePinHigh(B0); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B2); break; case 3: - writePinHigh(B0); + gpio_write_pin_high(B0); break; case 4: - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); break; case 5: - writePinHigh(B1); + gpio_write_pin_high(B1); break; } } @@ -213,9 +213,9 @@ static void unselect_rows(void) setPinOutput(B1); setPinOutput(B2); // make all pins high to select Y7, nothing is connected to that (otherwise the first row will act weird) - writePinHigh(B0); - writePinHigh(B1); - writePinHigh(B2); + gpio_write_pin_high(B0); + gpio_write_pin_high(B1); + gpio_write_pin_high(B2); } static void init_pins(void) { diff --git a/keyboards/rookiebwoy/neopad/rev1/rev1.c b/keyboards/rookiebwoy/neopad/rev1/rev1.c index c8216f4e702..ab44ad811da 100755 --- a/keyboards/rookiebwoy/neopad/rev1/rev1.c +++ b/keyboards/rookiebwoy/neopad/rev1/rev1.c @@ -51,8 +51,8 @@ void matrix_init_kb(void) { // runs once when the firmware starts up uint8_t led_delay_ms = 80; for (int i = 0; i < 2; i++) { - writePinHigh(LED_00); - writePinHigh(LED_01); + gpio_write_pin_high(LED_00); + gpio_write_pin_high(LED_01); wait_ms(led_delay_ms); writePinLow(LED_00); writePinLow(LED_01); diff --git a/keyboards/ryanskidmore/rskeys100/matrix.c b/keyboards/ryanskidmore/rskeys100/matrix.c index 560e3e0811b..b9c5222d518 100644 --- a/keyboards/ryanskidmore/rskeys100/matrix.c +++ b/keyboards/ryanskidmore/rskeys100/matrix.c @@ -86,7 +86,7 @@ static void shift_out(uint32_t value) { shift_out_single(first_byte); shift_out_single(second_byte); shift_out_single(third_byte); - writePinHigh(SHR_LATCH); + gpio_write_pin_high(SHR_LATCH); /* We delay here to prevent multiple consecutive keys being triggered with a single switch press */ _delay_us(10); } @@ -94,7 +94,7 @@ static void shift_out(uint32_t value) { static void shift_out_single(uint8_t value) { for (uint8_t i = 0; i < 8; i++) { if (value & 0b10000000) { - writePinHigh(SHR_DATA); + gpio_write_pin_high(SHR_DATA); } else { writePinLow(SHR_DATA); } @@ -105,6 +105,6 @@ static void shift_out_single(uint8_t value) { } static inline void shift_pulse(void) { - writePinHigh(SHR_CLOCK); + gpio_write_pin_high(SHR_CLOCK); writePinLow(SHR_CLOCK); } \ No newline at end of file diff --git a/keyboards/sekigon/grs_70ec/ec_switch_matrix.c b/keyboards/sekigon/grs_70ec/ec_switch_matrix.c index d1c2d85ac83..a776b1d64f7 100644 --- a/keyboards/sekigon/grs_70ec/ec_switch_matrix.c +++ b/keyboards/sekigon/grs_70ec/ec_switch_matrix.c @@ -33,7 +33,7 @@ static uint16_t ecsm_sw_value[MATRIX_ROWS][MATRIX_COLS]; static inline void discharge_capacitor(void) { setPinOutput(DISCHARGE_PIN); } static inline void charge_capacitor(uint8_t row) { setPinInput(DISCHARGE_PIN); - writePinHigh(row_pins[row]); + gpio_write_pin_high(row_pins[row]); } static inline void clear_all_row_pins(void) { diff --git a/keyboards/sekigon/grs_70ec/grs_70ec.c b/keyboards/sekigon/grs_70ec/grs_70ec.c index e855a80dcff..eb764f8065a 100644 --- a/keyboards/sekigon/grs_70ec/grs_70ec.c +++ b/keyboards/sekigon/grs_70ec/grs_70ec.c @@ -18,7 +18,7 @@ void led_on(void) { setPinOutput(D2); - writePinHigh(D2); + gpio_write_pin_high(D2); } void led_off(void) { writePinLow(D2); } @@ -32,7 +32,7 @@ void keyboard_post_init_kb(void) { void keyboard_pre_init_kb(void) { // Turn on extern circuit setPinOutput(F7); - writePinHigh(F7); + gpio_write_pin_high(F7); keyboard_pre_init_user(); } diff --git a/keyboards/sergiopoverony/creator_pro/creator_pro.c b/keyboards/sergiopoverony/creator_pro/creator_pro.c index 55c0497df24..862212f97bc 100644 --- a/keyboards/sergiopoverony/creator_pro/creator_pro.c +++ b/keyboards/sergiopoverony/creator_pro/creator_pro.c @@ -29,5 +29,5 @@ void turn_off_leds(void) { writePinLow(GREEN_LED); } void turn_on_led(pin_t pin) { - writePinHigh(pin); + gpio_write_pin_high(pin); } diff --git a/keyboards/sirius/uni660/rev1/rev1.c b/keyboards/sirius/uni660/rev1/rev1.c index 7cc75ee22a4..c9429e79dbe 100644 --- a/keyboards/sirius/uni660/rev1/rev1.c +++ b/keyboards/sirius/uni660/rev1/rev1.c @@ -2,11 +2,11 @@ void led_init(void) { setPinOutput(D1); // Pin to green, set as output - writePinHigh(D1); // Turn it off + gpio_write_pin_high(D1); // Turn it off setPinOutput(F4); // Pins to red and blue, set as output setPinOutput(F5); - writePinHigh(F4); // Turn them off - writePinHigh(F5); + gpio_write_pin_high(F4); // Turn them off + gpio_write_pin_high(F5); } void matrix_init_kb(void) { diff --git a/keyboards/sirius/uni660/rev1/rev1.h b/keyboards/sirius/uni660/rev1/rev1.h index 06a7176fbd8..36270d188cf 100644 --- a/keyboards/sirius/uni660/rev1/rev1.h +++ b/keyboards/sirius/uni660/rev1/rev1.h @@ -2,11 +2,11 @@ #include "quantum.h" -#define red_led_off writePinHigh(F5) +#define red_led_off gpio_write_pin_high(F5) #define red_led_on writePinLow(F5) -#define blu_led_off writePinHigh(F4) +#define blu_led_off gpio_write_pin_high(F4) #define blu_led_on writePinLow(F4) -#define grn_led_off writePinHigh(D1) +#define grn_led_off gpio_write_pin_high(D1) #define grn_led_on writePinLow(D1) #define set_led_off red_led_off; grn_led_off; blu_led_off diff --git a/keyboards/sirius/uni660/rev2/rev2.c b/keyboards/sirius/uni660/rev2/rev2.c index 2c2515c0edb..b0202166923 100644 --- a/keyboards/sirius/uni660/rev2/rev2.c +++ b/keyboards/sirius/uni660/rev2/rev2.c @@ -2,11 +2,11 @@ void led_init(void) { setPinOutput(D1); // Pin to green, set as output - writePinHigh(D1); // Turn it off + gpio_write_pin_high(D1); // Turn it off setPinOutput(F4); // Pins to red and blue, set as output setPinOutput(F5); - writePinHigh(F4); // Turn them off - writePinHigh(F5); + gpio_write_pin_high(F4); // Turn them off + gpio_write_pin_high(F5); } void matrix_init_kb(void) { diff --git a/keyboards/sirius/uni660/rev2/rev2.h b/keyboards/sirius/uni660/rev2/rev2.h index 06a7176fbd8..36270d188cf 100644 --- a/keyboards/sirius/uni660/rev2/rev2.h +++ b/keyboards/sirius/uni660/rev2/rev2.h @@ -2,11 +2,11 @@ #include "quantum.h" -#define red_led_off writePinHigh(F5) +#define red_led_off gpio_write_pin_high(F5) #define red_led_on writePinLow(F5) -#define blu_led_off writePinHigh(F4) +#define blu_led_off gpio_write_pin_high(F4) #define blu_led_on writePinLow(F4) -#define grn_led_off writePinHigh(D1) +#define grn_led_off gpio_write_pin_high(D1) #define grn_led_on writePinLow(D1) #define set_led_off red_led_off; grn_led_off; blu_led_off diff --git a/keyboards/skyloong/gk61/pro/pro.c b/keyboards/skyloong/gk61/pro/pro.c index 06d9ce721d8..bb43b16cdc6 100644 --- a/keyboards/skyloong/gk61/pro/pro.c +++ b/keyboards/skyloong/gk61/pro/pro.c @@ -220,7 +220,7 @@ void suspend_power_down_kb() { void suspend_wakeup_init_kb() { # ifdef RGB_MATRIX_ENABLE - writePinHigh(IS31FL3743A_SDB_PIN); + gpio_write_pin_high(IS31FL3743A_SDB_PIN); # endif suspend_wakeup_init_user(); } diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c index c5758ffcf4c..4d94c52bcb3 100644 --- a/keyboards/skyloong/gk61/pro_48/pro_48.c +++ b/keyboards/skyloong/gk61/pro_48/pro_48.c @@ -154,7 +154,7 @@ void suspend_power_down_kb(void) { } void suspend_wakeup_init_kb(void) { - writePinHigh(IS31FL3743A_SDB_PIN); + gpio_write_pin_high(IS31FL3743A_SDB_PIN); suspend_wakeup_init_user(); } #endif diff --git a/keyboards/skyloong/gk61/v1/v1.c b/keyboards/skyloong/gk61/v1/v1.c index 01e6b6c6ae6..0c70f2d7b30 100644 --- a/keyboards/skyloong/gk61/v1/v1.c +++ b/keyboards/skyloong/gk61/v1/v1.c @@ -108,7 +108,7 @@ void suspend_power_down_kb() { } void suspend_wakeup_init_kb() { - writePinHigh(SNLED27351_SDB_PIN); + gpio_write_pin_high(SNLED27351_SDB_PIN); suspend_wakeup_init_user(); } diff --git a/keyboards/snes_macropad/matrix.c b/keyboards/snes_macropad/matrix.c index 092cb29f42e..48d494e9fa4 100644 --- a/keyboards/snes_macropad/matrix.c +++ b/keyboards/snes_macropad/matrix.c @@ -49,9 +49,9 @@ void matrix_init_custom(void) { setPinOutput(KBD_ROW0); setPinOutput(KBD_ROW1); setPinOutput(KBD_ROW2); - writePinHigh(KBD_ROW0); - writePinHigh(KBD_ROW1); - writePinHigh(KBD_ROW2); + gpio_write_pin_high(KBD_ROW0); + gpio_write_pin_high(KBD_ROW1); + gpio_write_pin_high(KBD_ROW2); // init columns setPinInputHigh(KBD_COL0); @@ -77,7 +77,7 @@ static matrix_row_t readRow(size_t row, int setupDelay) { // deselect the row setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); return ret; } @@ -103,7 +103,7 @@ static matrix_row_t getBits(uint16_t value, size_t bit0, size_t bit1, size_t bit static void readSnesController(matrix_row_t current_matrix[]) { uint16_t controller = 0; - writePinHigh(SNES_LATCH); + gpio_write_pin_high(SNES_LATCH); for (size_t bit = 0; bit < SNES_DATA_BITS; ++bit) { // Wait for shift register to setup the data line @@ -115,7 +115,7 @@ static void readSnesController(matrix_row_t current_matrix[]) { // todo: maybe read D1 and IO here too // Shift next bit in - writePinHigh(SNES_CLOCK); + gpio_write_pin_high(SNES_CLOCK); wait_us(SNES_CLOCK_PULSE_DURATION); writePinLow(SNES_CLOCK); } diff --git a/keyboards/telophase/telophase.c b/keyboards/telophase/telophase.c index 334cc7697b7..25c9f77c450 100644 --- a/keyboards/telophase/telophase.c +++ b/keyboards/telophase/telophase.c @@ -21,9 +21,9 @@ void led_init(void) { setPinOutput(D1); setPinOutput(F4); setPinOutput(F5); - writePinHigh(D1); - writePinHigh(F4); - writePinHigh(F5); + gpio_write_pin_high(D1); + gpio_write_pin_high(F4); + gpio_write_pin_high(F5); } void matrix_init_kb(void) { diff --git a/keyboards/telophase/telophase.h b/keyboards/telophase/telophase.h index 112ba79504a..e31f84f76df 100644 --- a/keyboards/telophase/telophase.h +++ b/keyboards/telophase/telophase.h @@ -19,11 +19,11 @@ along with this program. If not, see . #include "quantum.h" -#define red_led_off writePinHigh(F5) +#define red_led_off gpio_write_pin_high(F5) #define red_led_on writePinLow(F5) -#define blu_led_off writePinHigh(F4) +#define blu_led_off gpio_write_pin_high(F4) #define blu_led_on writePinLow(F4) -#define grn_led_off writePinHigh(D1) +#define grn_led_off gpio_write_pin_high(D1) #define grn_led_on writePinLow(D1) #define set_led_off red_led_off; grn_led_off; blu_led_off diff --git a/keyboards/tkc/m0lly/m0lly.c b/keyboards/tkc/m0lly/m0lly.c index 2f76952b1f8..3aba1a75b98 100644 --- a/keyboards/tkc/m0lly/m0lly.c +++ b/keyboards/tkc/m0lly/m0lly.c @@ -21,7 +21,7 @@ void keyboard_pre_init_kb(void) { setPinInputHigh(D1); setPinOutput(B7); - writePinHigh(B7); + gpio_write_pin_high(B7); keyboard_pre_init_user(); } diff --git a/keyboards/tkc/tkc1800/tkc1800.c b/keyboards/tkc/tkc1800/tkc1800.c index b5b4cf0887f..f338e67d817 100644 --- a/keyboards/tkc/tkc1800/tkc1800.c +++ b/keyboards/tkc/tkc1800/tkc1800.c @@ -20,7 +20,7 @@ void keyboard_pre_init_kb(void) { setPinInputHigh(D1); setPinOutput(B7); - writePinHigh(B7); + gpio_write_pin_high(B7); keyboard_pre_init_user(); } diff --git a/keyboards/touchpad/matrix.c b/keyboards/touchpad/matrix.c index 3b90c11b65d..c788383d0b4 100644 --- a/keyboards/touchpad/matrix.c +++ b/keyboards/touchpad/matrix.c @@ -132,7 +132,7 @@ void matrix_init(void) { //Power LED setPinOutput(B7); - writePinHigh(B7); + gpio_write_pin_high(B7); //LEDs Columns setPinOutput(F7); @@ -251,8 +251,8 @@ uint8_t matrix_scan(void) { } if (vibrate == VIBRATE_LENGTH) { - writePinHigh(E6); - writePinHigh(D7); + gpio_write_pin_high(E6); + gpio_write_pin_high(D7); vibrate--; } else if (vibrate > 0) { vibrate--; diff --git a/keyboards/tzarc/djinn/djinn.c b/keyboards/tzarc/djinn/djinn.c index 17e5833ee9e..b3a6daab5d2 100644 --- a/keyboards/tzarc/djinn/djinn.c +++ b/keyboards/tzarc/djinn/djinn.c @@ -55,16 +55,16 @@ void keyboard_post_init_kb(void) { // Turn on the RGB setPinOutput(RGB_POWER_ENABLE_PIN); - writePinHigh(RGB_POWER_ENABLE_PIN); + gpio_write_pin_high(RGB_POWER_ENABLE_PIN); #ifdef EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN setPinOutput(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN); - writePinHigh(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN); + gpio_write_pin_high(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN); #endif // EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN // Turn on the LCD setPinOutput(LCD_POWER_ENABLE_PIN); - writePinHigh(LCD_POWER_ENABLE_PIN); + gpio_write_pin_high(LCD_POWER_ENABLE_PIN); // Let the LCD get some power... wait_ms(150); @@ -154,12 +154,12 @@ void housekeeping_task_kb(void) { writePinLow(RGB_CURR_3000mA_OK_PIN); break; case USBPD_1500MA: - writePinHigh(RGB_CURR_1500mA_OK_PIN); + gpio_write_pin_high(RGB_CURR_1500mA_OK_PIN); writePinLow(RGB_CURR_3000mA_OK_PIN); break; case USBPD_3000MA: - writePinHigh(RGB_CURR_1500mA_OK_PIN); - writePinHigh(RGB_CURR_3000mA_OK_PIN); + gpio_write_pin_high(RGB_CURR_1500mA_OK_PIN); + gpio_write_pin_high(RGB_CURR_3000mA_OK_PIN); break; } #else @@ -172,7 +172,7 @@ void housekeeping_task_kb(void) { writePinLow(RGB_CURR_3000mA_OK_PIN); break; case USBPD_3000MA: - writePinHigh(RGB_CURR_1500mA_OK_PIN); + gpio_write_pin_high(RGB_CURR_1500mA_OK_PIN); writePinLow(RGB_CURR_3000mA_OK_PIN); break; } @@ -191,7 +191,7 @@ void housekeeping_task_kb(void) { // Enable/disable RGB if (peripherals_on) { // Turn on RGB - writePinHigh(RGB_POWER_ENABLE_PIN); + gpio_write_pin_high(RGB_POWER_ENABLE_PIN); // Modify the RGB state if different to the LCD state if (rgb_matrix_is_enabled() != peripherals_on) { // Wait for a small amount of time to allow the RGB capacitors to charge, before enabling RGB output diff --git a/keyboards/tzarc/djinn/djinn_portscan_matrix.c b/keyboards/tzarc/djinn/djinn_portscan_matrix.c index a72419f7d02..3044a46d5aa 100644 --- a/keyboards/tzarc/djinn/djinn_portscan_matrix.c +++ b/keyboards/tzarc/djinn/djinn_portscan_matrix.c @@ -115,11 +115,11 @@ void matrix_wait_for_interrupt(void) { // Now that the interrupt has woken us up, reset all the row/col pins back to defaults for (int i = 0; i < ARRAY_SIZE(row_pins); ++i) { palDisableLineEvent(row_pins[i]); - writePinHigh(row_pins[i]); + gpio_write_pin_high(row_pins[i]); setPinInputHigh(row_pins[i]); } for (int i = 0; i < ARRAY_SIZE(col_pins); ++i) { - writePinHigh(col_pins[i]); + gpio_write_pin_high(col_pins[i]); setPinInputHigh(col_pins[i]); } } diff --git a/keyboards/tzarc/ghoul/ghoul.c b/keyboards/tzarc/ghoul/ghoul.c index 387c107bb83..f9bcb8416ef 100644 --- a/keyboards/tzarc/ghoul/ghoul.c +++ b/keyboards/tzarc/ghoul/ghoul.c @@ -7,7 +7,7 @@ void keyboard_post_init_kb(void) { // Enable RGB current limiter and wait for a bit before allowing RGB to continue setPinOutput(RGB_ENABLE_PIN); - writePinHigh(RGB_ENABLE_PIN); + gpio_write_pin_high(RGB_ENABLE_PIN); wait_ms(20); // Offload to the user func @@ -17,7 +17,7 @@ void keyboard_post_init_kb(void) { void matrix_init_custom(void) { // SPI Matrix setPinOutput(SPI_MATRIX_CHIP_SELECT_PIN); - writePinHigh(SPI_MATRIX_CHIP_SELECT_PIN); + gpio_write_pin_high(SPI_MATRIX_CHIP_SELECT_PIN); spi_init(); // Encoder pushbutton diff --git a/keyboards/viktus/minne_topre/ec.c b/keyboards/viktus/minne_topre/ec.c index 569c8785822..db1af7e582c 100644 --- a/keyboards/viktus/minne_topre/ec.c +++ b/keyboards/viktus/minne_topre/ec.c @@ -51,7 +51,7 @@ static uint16_t ec_sw_value[MATRIX_COLS][MATRIX_ROWS]; static inline void discharge_capacitor(void) { setPinOutput(DISCHARGE_PIN); } static inline void charge_capacitor(uint8_t col) { setPinInput(DISCHARGE_PIN); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } static inline void clear_all_col_pins(void) { diff --git a/keyboards/viktus/osav2_numpad_topre/ec.c b/keyboards/viktus/osav2_numpad_topre/ec.c index e4f59c3b6bf..96feca9ddbf 100644 --- a/keyboards/viktus/osav2_numpad_topre/ec.c +++ b/keyboards/viktus/osav2_numpad_topre/ec.c @@ -51,7 +51,7 @@ static uint16_t ec_sw_value[MATRIX_COLS][MATRIX_ROWS]; static inline void discharge_capacitor(void) { setPinOutput(DISCHARGE_PIN); } static inline void charge_capacitor(uint8_t col) { setPinInput(DISCHARGE_PIN); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } static inline void clear_all_col_pins(void) { diff --git a/keyboards/viktus/osav2_topre/ec.c b/keyboards/viktus/osav2_topre/ec.c index 076ffc0ba86..1ca89889ba7 100644 --- a/keyboards/viktus/osav2_topre/ec.c +++ b/keyboards/viktus/osav2_topre/ec.c @@ -51,7 +51,7 @@ static uint16_t ec_sw_value[MATRIX_COLS][MATRIX_ROWS]; static inline void discharge_capacitor(void) { setPinOutput(DISCHARGE_PIN); } static inline void charge_capacitor(uint8_t col) { setPinInput(DISCHARGE_PIN); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } static inline void clear_all_col_pins(void) { diff --git a/keyboards/viktus/styrka_topre/ec.c b/keyboards/viktus/styrka_topre/ec.c index c9980461afb..dd1c8fbb8b9 100644 --- a/keyboards/viktus/styrka_topre/ec.c +++ b/keyboards/viktus/styrka_topre/ec.c @@ -52,7 +52,7 @@ static uint16_t ec_sw_value[MATRIX_COLS][MATRIX_ROWS]; static inline void discharge_capacitor(void) { setPinOutput(DISCHARGE_PIN); } static inline void charge_capacitor(uint8_t col) { setPinInput(DISCHARGE_PIN); - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } static inline void clear_all_col_pins(void) { diff --git a/keyboards/work_louder/micro/matrix.c b/keyboards/work_louder/micro/matrix.c index 061d8f68a0c..cf714629653 100644 --- a/keyboards/work_louder/micro/matrix.c +++ b/keyboards/work_louder/micro/matrix.c @@ -30,7 +30,7 @@ static inline void setPinOutput_writeLow(pin_t pin) { static inline void setPinOutput_writeHigh(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); - writePinHigh(pin); + gpio_write_pin_high(pin); } } diff --git a/keyboards/xiudi/xd75/xd75.c b/keyboards/xiudi/xd75/xd75.c index b016643572a..97a67b02cb6 100644 --- a/keyboards/xiudi/xd75/xd75.c +++ b/keyboards/xiudi/xd75/xd75.c @@ -34,7 +34,7 @@ void capslock_led_init(void) { } void capslock_led_off(void) { - writePinHigh(XD75_CAPSLOCK_LED); + gpio_write_pin_high(XD75_CAPSLOCK_LED); } void capslock_led_on(void) { @@ -47,7 +47,7 @@ void gp100_led_init(void) { } void gp100_led_off(void) { - writePinHigh(XD75_GP100_LED); + gpio_write_pin_high(XD75_GP100_LED); } void gp100_led_on(void) { @@ -64,5 +64,5 @@ void gp103_led_off(void) { } void gp103_led_on(void) { - writePinHigh(XD75_GP103_LED); + gpio_write_pin_high(XD75_GP103_LED); } diff --git a/keyboards/ymdk/yd60mq/yd60mq.c b/keyboards/ymdk/yd60mq/yd60mq.c index 1a14040907f..2d4e4f50c74 100644 --- a/keyboards/ymdk/yd60mq/yd60mq.c +++ b/keyboards/ymdk/yd60mq/yd60mq.c @@ -3,7 +3,7 @@ __attribute__((weak)) void matrix_init_kb(void){ setPinOutput(F4); - writePinHigh(F4); + gpio_write_pin_high(F4); } __attribute__((weak)) diff --git a/keyboards/zsa/moonlander/matrix.c b/keyboards/zsa/moonlander/matrix.c index 6e7621a6ed1..7b9cc71660c 100644 --- a/keyboards/zsa/moonlander/matrix.c +++ b/keyboards/zsa/moonlander/matrix.c @@ -117,12 +117,12 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { for (uint8_t row = 0; row <= ROWS_PER_HAND; row++) { // strobe row switch (row) { - case 0: writePinHigh(B10); break; - case 1: writePinHigh(B11); break; - case 2: writePinHigh(B12); break; - case 3: writePinHigh(B13); break; - case 4: writePinHigh(B14); break; - case 5: writePinHigh(B15); break; + case 0: gpio_write_pin_high(B10); break; + case 1: gpio_write_pin_high(B11); break; + case 2: gpio_write_pin_high(B12); break; + case 3: gpio_write_pin_high(B13); break; + case 4: gpio_write_pin_high(B14); break; + case 5: gpio_write_pin_high(B15); break; case 6: break; // Left hand has 6 rows }