diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c index 5792f51ca8..3b5442c957 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c @@ -20,11 +20,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); } else { - setPinInput(B2); - writePinLow(B2); + gpio_set_pin_input(B2); + gpio_write_pin_low(B2); } return false; } diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c index 20783c22cb..b720c984e4 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/iso/keymap.c @@ -20,11 +20,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); } else { - setPinInput(B2); - writePinLow(B2); + gpio_set_pin_input(B2); + gpio_write_pin_low(B2); } return false; } diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c index 5cc9227885..a634d913b2 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/tsangan/keymap.c @@ -20,11 +20,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); } else { - setPinInput(B2); - writePinLow(B2); + gpio_set_pin_input(B2); + gpio_write_pin_low(B2); } return false; } diff --git a/keyboards/45_ats/keymaps/default/keymap.c b/keyboards/45_ats/keymaps/default/keymap.c index 3208614b32..3d4b74ab40 100644 --- a/keyboards/45_ats/keymaps/default/keymap.c +++ b/keyboards/45_ats/keymaps/default/keymap.c @@ -90,9 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //function for layer indicator LED layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D0, layer_state_cmp(state, 0)); - writePin(D1, layer_state_cmp(state, 1)); - writePin(D2, layer_state_cmp(state, 2)); + gpio_write_pin(D0, layer_state_cmp(state, 0)); + gpio_write_pin(D1, layer_state_cmp(state, 1)); + gpio_write_pin(D2, layer_state_cmp(state, 2)); return state; } diff --git a/keyboards/45_ats/keymaps/via/keymap.c b/keyboards/45_ats/keymaps/via/keymap.c index 3208614b32..3d4b74ab40 100644 --- a/keyboards/45_ats/keymaps/via/keymap.c +++ b/keyboards/45_ats/keymaps/via/keymap.c @@ -90,9 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //function for layer indicator LED layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D0, layer_state_cmp(state, 0)); - writePin(D1, layer_state_cmp(state, 1)); - writePin(D2, layer_state_cmp(state, 2)); + gpio_write_pin(D0, layer_state_cmp(state, 0)); + gpio_write_pin(D1, layer_state_cmp(state, 1)); + gpio_write_pin(D2, layer_state_cmp(state, 2)); return state; } diff --git a/keyboards/blu/vimclutch/keymaps/default/keymap.c b/keyboards/blu/vimclutch/keymaps/default/keymap.c index 49eaa2b881..9c602571d8 100644 --- a/keyboards/blu/vimclutch/keymaps/default/keymap.c +++ b/keyboards/blu/vimclutch/keymaps/default/keymap.c @@ -37,8 +37,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer-specific lighting */ layer_state_t layer_state_set_user(layer_state_t state) { - writePin(F4, !layer_state_cmp(state, _VC)); - writePin(F5, !layer_state_cmp(state, _VIM)); + gpio_write_pin(F4, !layer_state_cmp(state, _VC)); + gpio_write_pin(F5, !layer_state_cmp(state, _VIM)); return state; }; diff --git a/keyboards/bobpad/keymaps/default/keymap.c b/keyboards/bobpad/keymaps/default/keymap.c index 5c7dcd591e..f02c9764b7 100644 --- a/keyboards/bobpad/keymaps/default/keymap.c +++ b/keyboards/bobpad/keymaps/default/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D0, IS_LAYER_ON_STATE(state, 1)); + gpio_write_pin(D0, IS_LAYER_ON_STATE(state, 1)); return state; } diff --git a/keyboards/bobpad/keymaps/via/keymap.c b/keyboards/bobpad/keymaps/via/keymap.c index c244c6037e..6129229903 100644 --- a/keyboards/bobpad/keymaps/via/keymap.c +++ b/keyboards/bobpad/keymaps/via/keymap.c @@ -46,11 +46,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // C6 E6 D7 void matrix_scan_user(void) { - writePin(C6, layer_state_is(1)); - writePin(E6, layer_state_is(2)); - writePin(D7, layer_state_is(3)); - writePin(D4, layer_state_is(4)); - writePin(D0, layer_state_is(5)); + gpio_write_pin(C6, layer_state_is(1)); + gpio_write_pin(E6, layer_state_is(2)); + gpio_write_pin(D7, layer_state_is(3)); + gpio_write_pin(D4, layer_state_is(4)); + gpio_write_pin(D0, layer_state_is(5)); if (is_alt_tab_active) { if (timer_elapsed(alt_tab_timer) > 1000) { unregister_code(KC_LWIN); diff --git a/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c b/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c index 0f3911a2d3..c6bda674e3 100644 --- a/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c +++ b/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c @@ -47,15 +47,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - setPinOutput(B0); - writePinLow(B0); + gpio_set_pin_output(B0); + gpio_write_pin_low(B0); } bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - writePinHigh(B0); + gpio_write_pin_high(B0); } else { - writePinLow(B0); + gpio_write_pin_low(B0); } return false; } diff --git a/keyboards/cutie_club/wraith/keymaps/default/keymap.c b/keyboards/cutie_club/wraith/keymaps/default/keymap.c index 7759bb6e46..3e6c460a56 100644 --- a/keyboards/cutie_club/wraith/keymaps/default/keymap.c +++ b/keyboards/cutie_club/wraith/keymaps/default/keymap.c @@ -37,8 +37,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_scan_user(void) { // escape LED on layer 1 if (IS_LAYER_ON(1)) { - writePinLow(B0); + gpio_write_pin_low(B0); } else { - writePinHigh(B0); + gpio_write_pin_high(B0); } } diff --git a/keyboards/darkproject/kd83a_bfg_edition/keymaps/default/keymap.c b/keyboards/darkproject/kd83a_bfg_edition/keymaps/default/keymap.c index 0d426d3c9a..0c23701f5b 100644 --- a/keyboards/darkproject/kd83a_bfg_edition/keymaps/default/keymap.c +++ b/keyboards/darkproject/kd83a_bfg_edition/keymaps/default/keymap.c @@ -73,6 +73,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { #endif layer_state_t layer_state_set_user(layer_state_t state) { - writePin(C0, layer_state_cmp(state, 1)); + gpio_write_pin(C0, layer_state_cmp(state, 1)); return state; }; diff --git a/keyboards/darkproject/kd83a_bfg_edition/keymaps/via/keymap.c b/keyboards/darkproject/kd83a_bfg_edition/keymaps/via/keymap.c index 0d426d3c9a..0c23701f5b 100644 --- a/keyboards/darkproject/kd83a_bfg_edition/keymaps/via/keymap.c +++ b/keyboards/darkproject/kd83a_bfg_edition/keymaps/via/keymap.c @@ -73,6 +73,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { #endif layer_state_t layer_state_set_user(layer_state_t state) { - writePin(C0, layer_state_cmp(state, 1)); + gpio_write_pin(C0, layer_state_cmp(state, 1)); return state; }; diff --git a/keyboards/darkproject/kd87a_bfg_edition/keymaps/default/keymap.c b/keyboards/darkproject/kd87a_bfg_edition/keymaps/default/keymap.c index 5f475caa1b..8d48ed9acf 100644 --- a/keyboards/darkproject/kd87a_bfg_edition/keymaps/default/keymap.c +++ b/keyboards/darkproject/kd87a_bfg_edition/keymaps/default/keymap.c @@ -64,6 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - writePin(C0, layer_state_cmp(state, 1)); + gpio_write_pin(C0, layer_state_cmp(state, 1)); return state; }; \ No newline at end of file diff --git a/keyboards/darkproject/kd87a_bfg_edition/keymaps/via/keymap.c b/keyboards/darkproject/kd87a_bfg_edition/keymaps/via/keymap.c index 300855c452..e4de9aff08 100644 --- a/keyboards/darkproject/kd87a_bfg_edition/keymaps/via/keymap.c +++ b/keyboards/darkproject/kd87a_bfg_edition/keymaps/via/keymap.c @@ -64,6 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - writePin(C0, layer_state_cmp(state, 1)); + gpio_write_pin(C0, layer_state_cmp(state, 1)); return state; }; diff --git a/keyboards/db/db63/keymaps/default/keymap.c b/keyboards/db/db63/keymaps/default/keymap.c index 409545b2a9..b1cc922c8f 100644 --- a/keyboards/db/db63/keymaps/default/keymap.c +++ b/keyboards/db/db63/keymaps/default/keymap.c @@ -51,10 +51,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { rgblight_sethsv(HSV_CYAN); - writePinHigh(D1); + gpio_write_pin_high(D1); } else { rgblight_sethsv(HSV_GREEN); - writePinLow(D1); + gpio_write_pin_low(D1); } return false; } diff --git a/keyboards/dm9records/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c index 419f2590ca..2b366f4930 100644 --- a/keyboards/dm9records/plaid/keymaps/default/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/default/keymap.c @@ -215,18 +215,18 @@ led_config_t led_config; //Set leds to saved state during powerup void keyboard_post_init_user(void) { // set LED pin modes - setPinOutput(LED_RED); - setPinOutput(LED_GREEN); + gpio_set_pin_output(LED_RED); + gpio_set_pin_output(LED_GREEN); // Call the post init code. led_config.raw = eeconfig_read_user(); if(led_config.red_mode == LEDMODE_ON) { - writePinHigh(LED_RED); + gpio_write_pin_high(LED_RED); } if(led_config.green_mode == LEDMODE_ON) { - writePinHigh(LED_GREEN); + gpio_write_pin_high(LED_GREEN); } } @@ -248,10 +248,10 @@ void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrec for (int i=0;ievent.pressed) { - writePinHigh(led); + gpio_write_pin_high(led); } else { - writePinLow(led); + gpio_write_pin_low(led); } } } @@ -260,30 +260,30 @@ void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrec if (record->event.pressed) { if(rand() % 2 == 1) { if(rand() % 2 == 0) { - writePinLow(led); + gpio_write_pin_low(led); } else { - writePinHigh(led); + gpio_write_pin_high(led); } } } break; case LEDMODE_KEY: if (record->event.pressed) { - writePinHigh(led); + gpio_write_pin_high(led); return; } else { - writePinLow(led); + gpio_write_pin_low(led); return; } break; case LEDMODE_ENTER: if (keycode==KC_ENT) { - writePinHigh(led); + gpio_write_pin_high(led); } else { - writePinLow(led); + gpio_write_pin_low(led); } break; @@ -345,11 +345,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (led_config.red_mode==LEDMODE_ON) { led_config.red_mode=LEDMODE_OFF; - writePinLow(LED_RED); + gpio_write_pin_low(LED_RED); } else { led_config.red_mode=LEDMODE_ON; - writePinHigh(LED_RED); + gpio_write_pin_high(LED_RED); } } eeconfig_update_user(led_config.raw); @@ -359,11 +359,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (led_config.green_mode==LEDMODE_ON) { led_config.green_mode=LEDMODE_OFF; - writePinLow(LED_GREEN); + gpio_write_pin_low(LED_GREEN); } else { led_config.green_mode=LEDMODE_ON; - writePinHigh(LED_GREEN); + gpio_write_pin_high(LED_GREEN); } } eeconfig_update_user(led_config.raw); diff --git a/keyboards/dm9records/plaid/keymaps/via/keymap.c b/keyboards/dm9records/plaid/keymaps/via/keymap.c index f54c5b9008..37019e89a5 100644 --- a/keyboards/dm9records/plaid/keymaps/via/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/via/keymap.c @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool led_update_user(led_t led_state) { - writePin(LED_RED, led_state.caps_lock); - writePin(LED_GREEN, led_state.scroll_lock); + gpio_write_pin(LED_RED, led_state.caps_lock); + gpio_write_pin(LED_GREEN, led_state.scroll_lock); return false; } diff --git a/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c b/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c index 92a10afc34..38db55938a 100644 --- a/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c +++ b/keyboards/dtisaac/dosa40rgb/keymaps/default/keymap.c @@ -66,6 +66,6 @@ bool rgb_matrix_indicators_user(void) { } void keyboard_pre_init_user(void) { - setPinOutput(B5); - writePinLow(B5); + gpio_set_pin_output(B5); + gpio_write_pin_low(B5); } diff --git a/keyboards/dyz/synthesis60/keymaps/default/keymap.c b/keyboards/dyz/synthesis60/keymaps/default/keymap.c index bdc705f90b..5173689dd0 100644 --- a/keyboards/dyz/synthesis60/keymaps/default/keymap.c +++ b/keyboards/dyz/synthesis60/keymaps/default/keymap.c @@ -48,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { if (get_highest_layer(state) != 0) { - writePinLow(C6); + gpio_write_pin_low(C6); } else { - writePinHigh(C6); + gpio_write_pin_high(C6); } return state; } diff --git a/keyboards/dyz/synthesis60/keymaps/default_arrow/keymap.c b/keyboards/dyz/synthesis60/keymaps/default_arrow/keymap.c index 5ef6db4675..3836e902f2 100644 --- a/keyboards/dyz/synthesis60/keymaps/default_arrow/keymap.c +++ b/keyboards/dyz/synthesis60/keymaps/default_arrow/keymap.c @@ -48,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { if (get_highest_layer(state) != 0) { - writePinLow(C6); + gpio_write_pin_low(C6); } else { - writePinHigh(C6); + gpio_write_pin_high(C6); } return state; } diff --git a/keyboards/dyz/synthesis60/keymaps/via/keymap.c b/keyboards/dyz/synthesis60/keymaps/via/keymap.c index bdc705f90b..5173689dd0 100644 --- a/keyboards/dyz/synthesis60/keymaps/via/keymap.c +++ b/keyboards/dyz/synthesis60/keymaps/via/keymap.c @@ -48,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { if (get_highest_layer(state) != 0) { - writePinLow(C6); + gpio_write_pin_low(C6); } else { - writePinHigh(C6); + gpio_write_pin_high(C6); } return state; } diff --git a/keyboards/evyd13/nt650/keymaps/default/keymap.c b/keyboards/evyd13/nt650/keymaps/default/keymap.c index e9978376d0..bc77aebae2 100644 --- a/keyboards/evyd13/nt650/keymaps/default/keymap.c +++ b/keyboards/evyd13/nt650/keymaps/default/keymap.c @@ -56,13 +56,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - setPinOutput(LOCK_LED_PIN); + gpio_set_pin_output(LOCK_LED_PIN); switch (get_highest_layer(state)) { case _LOCK: - writePin(LOCK_LED_PIN, 0); + gpio_write_pin(LOCK_LED_PIN, 0); break; default: // for any other layers, or the default layer - writePin(LOCK_LED_PIN, 1); + gpio_write_pin(LOCK_LED_PIN, 1); break; } return state; diff --git a/keyboards/evyd13/wonderland/keymaps/default/keymap.c b/keyboards/evyd13/wonderland/keymaps/default/keymap.c index cb81428043..3ef74fe359 100644 --- a/keyboards/evyd13/wonderland/keymaps/default/keymap.c +++ b/keyboards/evyd13/wonderland/keymaps/default/keymap.c @@ -46,9 +46,9 @@ layer_state_t layer_state_set_user(layer_state_t state) { // override kb level function bool led_update_user(led_t usb_led) { - writePin(B1, !top); - writePin(B2, !middle); - writePin(B3, !bottom); + gpio_write_pin(B1, !top); + gpio_write_pin(B2, !middle); + gpio_write_pin(B3, !bottom); return false; // we are using LEDs for something else override kb } #endif diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c index 696dda3a05..453be5b095 100644 --- a/keyboards/handwired/daishi/keymaps/default/keymap.c +++ b/keyboards/handwired/daishi/keymaps/default/keymap.c @@ -95,15 +95,15 @@ void matrix_init_user(void) { // Call the keymap level matrix init. // Set our LED pins as output - setPinOutput(C4); - setPinOutput(C5); - setPinOutput(C6); + gpio_set_pin_output(C4); + gpio_set_pin_output(C5); + gpio_set_pin_output(C6); } bool led_update_user(led_t led_state) { - writePin(C4, led_state.num_lock); - writePin(C5, led_state.caps_lock); - writePin(C6, led_state.scroll_lock); + gpio_write_pin(C4, led_state.num_lock); + gpio_write_pin(C5, led_state.caps_lock); + gpio_write_pin(C6, led_state.scroll_lock); return false; } diff --git a/keyboards/handwired/dqz11n1g/keymaps/default/keymap.c b/keyboards/handwired/dqz11n1g/keymaps/default/keymap.c index 29d9cad7b7..2a4ca0c703 100644 --- a/keyboards/handwired/dqz11n1g/keymaps/default/keymap.c +++ b/keyboards/handwired/dqz11n1g/keymaps/default/keymap.c @@ -54,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Show "Fun Lock" layer state via the "Fun Lock" LED */ layer_state_t layer_state_set_user(layer_state_t state) { - setPinOutput(LED_FUN_LOCK_PIN); + gpio_set_pin_output(LED_FUN_LOCK_PIN); if (layer_state_cmp(state, _FUNCTION)) - writePinHigh(LED_FUN_LOCK_PIN); + gpio_write_pin_high(LED_FUN_LOCK_PIN); else - writePinLow(LED_FUN_LOCK_PIN); + gpio_write_pin_low(LED_FUN_LOCK_PIN); return state; } diff --git a/keyboards/handwired/jopr/keymaps/default/keymap.c b/keyboards/handwired/jopr/keymaps/default/keymap.c index fc615b0109..9630ce6816 100644 --- a/keyboards/handwired/jopr/keymaps/default/keymap.c +++ b/keyboards/handwired/jopr/keymaps/default/keymap.c @@ -25,15 +25,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - writePinHigh(F1); + gpio_write_pin_high(F1); } else { - writePinLow(F1); + gpio_write_pin_low(F1); } if (led_state.scroll_lock) { - writePinHigh(F0); + gpio_write_pin_high(F0); } else { - writePinLow(F0); + gpio_write_pin_low(F0); } if (!led_state.num_lock) { @@ -46,13 +46,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (sysreq_led) { sysreq_led = false; - writePinLow(F4); + gpio_write_pin_low(F4); } else { switch(keycode) { case KC_SYSTEM_REQUEST: sysreq_led = true; - writePinHigh(F4); + gpio_write_pin_high(F4); } } } diff --git a/keyboards/handwired/jopr/keymaps/modded_white/keymap.c b/keyboards/handwired/jopr/keymaps/modded_white/keymap.c index 69d1a56bb5..f062953b3f 100644 --- a/keyboards/handwired/jopr/keymaps/modded_white/keymap.c +++ b/keyboards/handwired/jopr/keymaps/modded_white/keymap.c @@ -25,15 +25,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - writePinHigh(F1); + gpio_write_pin_high(F1); } else { - writePinLow(F1); + gpio_write_pin_low(F1); } if (led_state.scroll_lock) { - writePinHigh(F0); + gpio_write_pin_high(F0); } else { - writePinLow(F0); + gpio_write_pin_low(F0); } if (!led_state.num_lock) { @@ -46,13 +46,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (sysreq_led) { sysreq_led = false; - writePinLow(F4); + gpio_write_pin_low(F4); } else { switch(keycode) { case KC_SYSTEM_REQUEST: sysreq_led = true; - writePinHigh(F4); + gpio_write_pin_high(F4); } } } diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c index 6c3e757cec..6a581d420b 100644 --- a/keyboards/handwired/jotanck/keymaps/default/keymap.c +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -84,16 +84,16 @@ layer_state_t layer_state_set_user(layer_state_t state) { #ifdef JOTANCK_LEDS switch (get_highest_layer(state)) { case _LOWER: - writePinHigh(JOTANCK_LED1); - writePinLow(JOTANCK_LED2); + gpio_write_pin_high(JOTANCK_LED1); + gpio_write_pin_low(JOTANCK_LED2); break; case _RAISE: - writePinLow(JOTANCK_LED1); - writePinHigh(JOTANCK_LED2); + gpio_write_pin_low(JOTANCK_LED1); + gpio_write_pin_high(JOTANCK_LED2); break; default: - writePinLow(JOTANCK_LED1); - writePinLow(JOTANCK_LED2); + gpio_write_pin_low(JOTANCK_LED1); + gpio_write_pin_low(JOTANCK_LED2); break; }; #endif diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 856f0eda60..24fc4c20af 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -76,15 +76,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - setPinOutput(C7); - writePinLow(C7); + gpio_set_pin_output(C7); + gpio_write_pin_low(C7); } layer_state_t layer_state_set_user(layer_state_t state) { if (get_highest_layer(state)) { - writePinHigh(C7); + gpio_write_pin_high(C7); } else { - writePinLow(C7); + gpio_write_pin_low(C7); } return state; } diff --git a/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c index 69bd7ec877..9a99d23331 100644 --- a/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c +++ b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c @@ -51,7 +51,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LEDCHANGE: if (record->event.pressed) { led_state = !led_state; - writePin(F6, led_state); + gpio_write_pin(F6, led_state); } break; } @@ -59,6 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - setPinOutput(F6); - writePinLow(F6); + gpio_set_pin_output(F6); + gpio_write_pin_low(F6); } diff --git a/keyboards/handwired/prime_exl/keymaps/default/keymap.c b/keyboards/handwired/prime_exl/keymaps/default/keymap.c index ed3da63a15..2f310b0b41 100644 --- a/keyboards/handwired/prime_exl/keymaps/default/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/default/keymap.c @@ -67,16 +67,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool led_update_user(led_t led_state) { - writePin(NUM_LOCK_LED_PIN, led_state.num_lock); - writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock); - // writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock); + gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock); + gpio_write_pin(CAPS_LOCK_LED_PIN, led_state.caps_lock); + // gpio_write_pin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock); return false; } //function for layer indicator LED layer_state_t layer_state_set_user(layer_state_t state) { - writePin(SCROLL_LOCK_LED_PIN, (get_highest_layer(state) == 1)); + gpio_write_pin(SCROLL_LOCK_LED_PIN, (get_highest_layer(state) == 1)); return state; } diff --git a/keyboards/handwired/prime_exl/keymaps/via/keymap.c b/keyboards/handwired/prime_exl/keymaps/via/keymap.c index 2081d672de..b2f53cfdc6 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/via/keymap.c @@ -52,16 +52,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool led_update_user(led_t led_state) { - writePin(NUM_LOCK_LED_PIN, led_state.num_lock); - writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock); - // writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock); + gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock); + gpio_write_pin(CAPS_LOCK_LED_PIN, led_state.caps_lock); + // gpio_write_pin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock); return false; } //function for layer indicator LED layer_state_t layer_state_set_user(layer_state_t state) { - writePin(SCROLL_LOCK_LED_PIN, (get_highest_layer(state) == 1)); + gpio_write_pin(SCROLL_LOCK_LED_PIN, (get_highest_layer(state) == 1)); return state; } diff --git a/keyboards/handwired/sono1/keymaps/default/keymap.c b/keyboards/handwired/sono1/keymaps/default/keymap.c index a3bf8b7106..cd9f9bcdb6 100644 --- a/keyboards/handwired/sono1/keymaps/default/keymap.c +++ b/keyboards/handwired/sono1/keymaps/default/keymap.c @@ -150,18 +150,18 @@ layer_state_t layer_state_set_user(layer_state_t state) { /* Use LED0 and 4 (Kana and KB Lock as layer indicators) */ switch (get_highest_layer(state)) { case _FN: - writePinLow(LED_KANA_PIN); + gpio_write_pin_low(LED_KANA_PIN); break; case _MUS: - writePinLow(LED_KB_LOCK_PIN); + gpio_write_pin_low(LED_KB_LOCK_PIN); break; case _LOCK: - writePinLow(LED_KANA_PIN); - writePinLow(LED_KB_LOCK_PIN); + gpio_write_pin_low(LED_KANA_PIN); + gpio_write_pin_low(LED_KB_LOCK_PIN); break; default: // for any other layers, or the default layer - writePinHigh(LED_KANA_PIN); - writePinHigh(LED_KB_LOCK_PIN); + gpio_write_pin_high(LED_KANA_PIN); + gpio_write_pin_high(LED_KB_LOCK_PIN); break; } return state; diff --git a/keyboards/hp69/keymaps/via/keymap.c b/keyboards/hp69/keymaps/via/keymap.c index e97e1bab7d..106cd1940d 100644 --- a/keyboards/hp69/keymaps/via/keymap.c +++ b/keyboards/hp69/keymaps/via/keymap.c @@ -50,10 +50,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_scan_user(void) { - writePin(A7, layer_state_is(1)); + gpio_write_pin(A7, layer_state_is(1)); } bool led_update_user(led_t led_state) { - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); return false; }; diff --git a/keyboards/jukaie/jk01/keymaps/default/keymap.c b/keyboards/jukaie/jk01/keymaps/default/keymap.c index 156fb77d69..243c782fad 100644 --- a/keyboards/jukaie/jk01/keymaps/default/keymap.c +++ b/keyboards/jukaie/jk01/keymaps/default/keymap.c @@ -73,6 +73,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { #endif layer_state_t layer_state_set_user(layer_state_t state) { - writePin(C0, layer_state_cmp(state, 1)); + gpio_write_pin(C0, layer_state_cmp(state, 1)); return state; }; diff --git a/keyboards/jukaie/jk01/keymaps/via/keymap.c b/keyboards/jukaie/jk01/keymaps/via/keymap.c index 156fb77d69..243c782fad 100644 --- a/keyboards/jukaie/jk01/keymaps/via/keymap.c +++ b/keyboards/jukaie/jk01/keymaps/via/keymap.c @@ -73,6 +73,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { #endif layer_state_t layer_state_set_user(layer_state_t state) { - writePin(C0, layer_state_cmp(state, 1)); + gpio_write_pin(C0, layer_state_cmp(state, 1)); return state; }; diff --git a/keyboards/kbdmania/kmac_pad/keymaps/default/keymap.c b/keyboards/kbdmania/kmac_pad/keymaps/default/keymap.c index e6afa53346..da94b40d79 100644 --- a/keyboards/kbdmania/kmac_pad/keymaps/default/keymap.c +++ b/keyboards/kbdmania/kmac_pad/keymaps/default/keymap.c @@ -132,12 +132,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } bool led_update_user(led_t led_state) { - writePin(B1, led_state.num_lock); + gpio_write_pin(B1, led_state.num_lock); return false; } layer_state_t layer_state_set_user(layer_state_t state) { - writePin(B3, !IS_LAYER_ON_STATE(state, 0)); + gpio_write_pin(B3, !IS_LAYER_ON_STATE(state, 0)); return state; } diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index 789bb7af02..55c89dc7e8 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -28,7 +28,7 @@ LAYOUT_ortho_4x4( // Only for Rev1 & Rev2 #ifdef LED_RED void keyboard_post_init_user(void) { - writePinHigh(LED_RED); + gpio_write_pin_high(LED_RED); } #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c index 4ca3fc944b..5163aa8900 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Only for Rev1 & Rev2 #ifdef LED_RED void keyboard_post_init_user(void) { - writePinHigh(LED_RED); + gpio_write_pin_high(LED_RED); } #endif diff --git a/keyboards/keyhive/navi10/keymaps/default/keymap.c b/keyboards/keyhive/navi10/keymaps/default/keymap.c index bbf51f56ff..2a9de35047 100644 --- a/keyboards/keyhive/navi10/keymaps/default/keymap.c +++ b/keyboards/keyhive/navi10/keymaps/default/keymap.c @@ -99,13 +99,13 @@ void tk_finished(tap_dance_state_t *state, void *user_data){ layer_off(_ML1); //turn off the indicator LED //set LED HI to turn it off - writePinHigh(INDICATOR_LED); + gpio_write_pin_high(INDICATOR_LED); } else { //turn on the media layer layer_on(_ML1); //turn on the indicator LED //set LED pin to LOW to turn it on - writePinLow(INDICATOR_LED); + gpio_write_pin_low(INDICATOR_LED); } break; case SINGLE_HOLD: diff --git a/keyboards/kin80/keymaps/default/keymap.c b/keyboards/kin80/keymaps/default/keymap.c index 311aeed989..50bad2a974 100644 --- a/keyboards/kin80/keymaps/default/keymap.c +++ b/keyboards/kin80/keymaps/default/keymap.c @@ -97,6 +97,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { - writePin(LED4_PIN, layer_state_cmp(state, _NM)); + gpio_write_pin(LED4_PIN, layer_state_cmp(state, _NM)); return state; } diff --git a/keyboards/kinesis/keymaps/alvicstep/keymap.c b/keyboards/kinesis/keymaps/alvicstep/keymap.c index e9373ea214..0068ef7d95 100644 --- a/keyboards/kinesis/keymaps/alvicstep/keymap.c +++ b/keyboards/kinesis/keymaps/alvicstep/keymap.c @@ -111,11 +111,11 @@ KC_GRV,KC_LGUI,KC_ESC,MO(_NUMPAD), KC_LBRC, layer_state_t layer_state_set_user(layer_state_t state) { //set LEDs which are triggered by a layer change #ifdef LED_COMPOSE_PIN - writePin(LED_COMPOSE_PIN, !layer_state_cmp(state, _KEYPAD)); + gpio_write_pin(LED_COMPOSE_PIN, !layer_state_cmp(state, _KEYPAD)); #endif #ifdef LED_NUM_LOCK_PIN - writePin(LED_NUM_LOCK_PIN, !layer_state_cmp(state, _NUMPAD)); + gpio_write_pin(LED_NUM_LOCK_PIN, !layer_state_cmp(state, _NUMPAD)); #endif return state; @@ -123,11 +123,11 @@ layer_state_t layer_state_set_user(layer_state_t state) { bool led_update_user(led_t led_state) { #ifdef LED_CAPS_LOCK_PIN - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); #endif #ifdef LED_SCROLL_LOCK_PIN - writePin(LED_SCROLL_LOCK_PIN, !led_state.scroll_lock); + gpio_write_pin(LED_SCROLL_LOCK_PIN, !led_state.scroll_lock); #endif //disable default processing of LEDs diff --git a/keyboards/kmini/keymaps/default/keymap.c b/keyboards/kmini/keymaps/default/keymap.c index 571572f38f..60fcac30ef 100755 --- a/keyboards/kmini/keymaps/default/keymap.c +++ b/keyboards/kmini/keymaps/default/keymap.c @@ -41,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - writePinLow(B1); + gpio_write_pin_low(B1); } else { - writePinHigh(B1); + gpio_write_pin_high(B1); } return false; } diff --git a/keyboards/lime/keymaps/default/keymap.c b/keyboards/lime/keymaps/default/keymap.c index b208bd01e7..e3e5d5a323 100644 --- a/keyboards/lime/keymaps/default/keymap.c +++ b/keyboards/lime/keymaps/default/keymap.c @@ -173,8 +173,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Joystick + Encoder fix */ void keyboard_post_init_kb(void) { if (is_keyboard_master()) { - writePinLow(JOYSTICK_X_PIN); - writePinLow(JOYSTICK_Y_PIN); + gpio_write_pin_low(JOYSTICK_X_PIN); + gpio_write_pin_low(JOYSTICK_Y_PIN); } } diff --git a/keyboards/makrosu/keymaps/default/keymap.c b/keyboards/makrosu/keymaps/default/keymap.c index b0c47dbdd9..3de4f71df3 100644 --- a/keyboards/makrosu/keymaps/default/keymap.c +++ b/keyboards/makrosu/keymaps/default/keymap.c @@ -60,9 +60,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _4, X_PAUSE, X_PAUSE); - writePin(IND_1, layer_state_cmp(state, 1)); - writePin(IND_2, layer_state_cmp(state, 2)); - writePin(IND_3, layer_state_cmp(state, 3)); + gpio_write_pin(IND_1, layer_state_cmp(state, 1)); + gpio_write_pin(IND_2, layer_state_cmp(state, 2)); + gpio_write_pin(IND_3, layer_state_cmp(state, 3)); return state; } @@ -89,13 +89,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { //init the Pro Micro on-board LEDs - setPinOutput(IND_1); - setPinOutput(IND_2); - setPinOutput(IND_3); + gpio_set_pin_output(IND_1); + gpio_set_pin_output(IND_2); + gpio_set_pin_output(IND_3); //set to off - writePinHigh(IND_1); - writePinHigh(IND_2); - writePinHigh(IND_3); + gpio_write_pin_high(IND_1); + gpio_write_pin_high(IND_2); + gpio_write_pin_high(IND_3); } bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/makrosu/keymaps/via/keymap.c b/keyboards/makrosu/keymaps/via/keymap.c index b0c47dbdd9..3de4f71df3 100644 --- a/keyboards/makrosu/keymaps/via/keymap.c +++ b/keyboards/makrosu/keymaps/via/keymap.c @@ -60,9 +60,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _4, X_PAUSE, X_PAUSE); - writePin(IND_1, layer_state_cmp(state, 1)); - writePin(IND_2, layer_state_cmp(state, 2)); - writePin(IND_3, layer_state_cmp(state, 3)); + gpio_write_pin(IND_1, layer_state_cmp(state, 1)); + gpio_write_pin(IND_2, layer_state_cmp(state, 2)); + gpio_write_pin(IND_3, layer_state_cmp(state, 3)); return state; } @@ -89,13 +89,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { //init the Pro Micro on-board LEDs - setPinOutput(IND_1); - setPinOutput(IND_2); - setPinOutput(IND_3); + gpio_set_pin_output(IND_1); + gpio_set_pin_output(IND_2); + gpio_set_pin_output(IND_3); //set to off - writePinHigh(IND_1); - writePinHigh(IND_2); - writePinHigh(IND_3); + gpio_write_pin_high(IND_1); + gpio_write_pin_high(IND_2); + gpio_write_pin_high(IND_3); } bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/marksard/leftover30/keymaps/default/keymap.c b/keyboards/marksard/leftover30/keymaps/default/keymap.c index 2e0d2aa6bb..ce527ea5a7 100644 --- a/keyboards/marksard/leftover30/keymaps/default/keymap.c +++ b/keyboards/marksard/leftover30/keymaps/default/keymap.c @@ -156,7 +156,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { // for exsample customize of LED inducator // bool led_update_user(led_t led_state) { -// writePin(D2, IS_LAYER_ON(_LOWER)); -// writePin(D1, IS_LAYER_ON(_RAISE)); +// gpio_write_pin(D2, IS_LAYER_ON(_LOWER)); +// gpio_write_pin(D1, IS_LAYER_ON(_RAISE)); // return false; // } diff --git a/keyboards/marksard/leftover30/keymaps/default_isoenter/keymap.c b/keyboards/marksard/leftover30/keymaps/default_isoenter/keymap.c index db2baa9085..831d7fa69e 100644 --- a/keyboards/marksard/leftover30/keymaps/default_isoenter/keymap.c +++ b/keyboards/marksard/leftover30/keymaps/default_isoenter/keymap.c @@ -156,7 +156,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { // for exsample customize of LED inducator // bool led_update_user(led_t led_state) { -// writePin(D2, IS_LAYER_ON(_LOWER)); -// writePin(D1, IS_LAYER_ON(_RAISE)); +// gpio_write_pin(D2, IS_LAYER_ON(_LOWER)); +// gpio_write_pin(D1, IS_LAYER_ON(_RAISE)); // return false; // } diff --git a/keyboards/mechlovin/kay65/keymaps/default/keymap.c b/keyboards/mechlovin/kay65/keymaps/default/keymap.c index 189b782b20..9c2bda5ac2 100644 --- a/keyboards/mechlovin/kay65/keymaps/default/keymap.c +++ b/keyboards/mechlovin/kay65/keymaps/default/keymap.c @@ -36,12 +36,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LOGO_LED_ON: if (record->event.pressed) { - writePinLow(D7); + gpio_write_pin_low(D7); } break; case LOGO_LED_OFF: if (record->event.pressed) { - writePinHigh(D7); + gpio_write_pin_high(D7); } break; } diff --git a/keyboards/mechlovin/kay65/keymaps/via/keymap.c b/keyboards/mechlovin/kay65/keymaps/via/keymap.c index 1f29ba8c3a..943d8d9bf0 100644 --- a/keyboards/mechlovin/kay65/keymaps/via/keymap.c +++ b/keyboards/mechlovin/kay65/keymaps/via/keymap.c @@ -59,12 +59,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LOGO_LED_ON: if (record->event.pressed) { - writePinLow(D7); + gpio_write_pin_low(D7); } break; case LOGO_LED_OFF: if (record->event.pressed) { - writePinHigh(D7); + gpio_write_pin_high(D7); } break; } diff --git a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/keymap.c b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/keymap.c index 017f57b160..a360d2c1ea 100644 --- a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/keymap.c +++ b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/default/keymap.c @@ -32,12 +32,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BL_ON: if (record->event.pressed) { - writePinHigh(B7); + gpio_write_pin_high(B7); } break; case BL_OFF: if (record->event.pressed) { - writePinLow(B7); + gpio_write_pin_low(B7); } break; } diff --git a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/via/keymap.c b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/via/keymap.c index 344be9548c..e6b991de7f 100644 --- a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/via/keymap.c +++ b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/keymaps/via/keymap.c @@ -57,12 +57,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LOGO_LED_ON: if (record->event.pressed) { - writePinHigh(B7); + gpio_write_pin_high(B7); } break; case LOGO_LED_OFF: if (record->event.pressed) { - writePinLow(B7); + gpio_write_pin_low(B7); } break; } diff --git a/keyboards/minimon/bartlesplit/matrix.c b/keyboards/minimon/bartlesplit/matrix.c index 351781f520..4be8496dcf 100644 --- a/keyboards/minimon/bartlesplit/matrix.c +++ b/keyboards/minimon/bartlesplit/matrix.c @@ -30,32 +30,32 @@ static const pin_t row_pins[] = MATRIX_ROW_PINS; static const pin_t col_pins[] = MATRIX_COL_PINS; static void select_row(uint8_t row) { - setPinOutput(row_pins[row]); - writePinLow(row_pins[row]); + gpio_set_pin_output(row_pins[row]); + gpio_write_pin_low(row_pins[row]); } static void unselect_row(uint8_t row) { - setPinInputHigh(row_pins[row]); + gpio_set_pin_input_high(row_pins[row]); } static void unselect_rows(void) { for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh(row_pins[x]); + gpio_set_pin_input_high(row_pins[x]); } } static void select_col(uint8_t col) { - setPinOutput(col_pins[col]); - writePinLow(col_pins[col]); + gpio_set_pin_output(col_pins[col]); + gpio_write_pin_low(col_pins[col]); } static void unselect_col(uint8_t col) { - setPinInputHigh(col_pins[col]); + gpio_set_pin_input_high(col_pins[col]); } static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS/2; x++) { - setPinInputHigh(col_pins[x*2]); + gpio_set_pin_input_high(col_pins[x*2]); } } @@ -76,7 +76,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) for (uint8_t col_index = 0; col_index < MATRIX_COLS / 2; col_index++) { uint16_t column_index_bitmask = ROW_SHIFTER << ((col_index * 2) + 1); // Check row pin state - if (readPin(col_pins[col_index*2])) { + if (gpio_read_pin(col_pins[col_index*2])) { // Pin HI, clear col bit current_matrix[current_row] &= ~column_index_bitmask; } else { @@ -105,7 +105,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) uint16_t column_index_bitmask = ROW_SHIFTER << (current_col * 2); // Check row pin state - if (readPin(row_pins[row_index])) { + if (gpio_read_pin(row_pins[row_index])) { // Pin HI, clear col bit current_matrix[row_index] &= ~column_index_bitmask; } else { diff --git a/keyboards/noxary/268/keymaps/ansi/keymap.c b/keyboards/noxary/268/keymaps/ansi/keymap.c index dfbf644549..6a81718d49 100644 --- a/keyboards/noxary/268/keymaps/ansi/keymap.c +++ b/keyboards/noxary/268/keymaps/ansi/keymap.c @@ -54,11 +54,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(B6); - writePinHigh(B6); + gpio_set_pin_output(B6); + gpio_write_pin_high(B6); } else { - setPinInput(B6); - writePinLow(B6); + gpio_set_pin_input(B6); + gpio_write_pin_low(B6); } return false; } diff --git a/keyboards/noxary/268/keymaps/default/keymap.c b/keyboards/noxary/268/keymaps/default/keymap.c index 717dba04b2..4692ca6fc6 100644 --- a/keyboards/noxary/268/keymaps/default/keymap.c +++ b/keyboards/noxary/268/keymaps/default/keymap.c @@ -72,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(B6); - writePinHigh(B6); + gpio_set_pin_output(B6); + gpio_write_pin_high(B6); } else { - setPinInput(B6); - writePinLow(B6); + gpio_set_pin_input(B6); + gpio_write_pin_low(B6); } return false; } diff --git a/keyboards/noxary/268/keymaps/iso/keymap.c b/keyboards/noxary/268/keymaps/iso/keymap.c index 827aa8bbd6..df21846167 100644 --- a/keyboards/noxary/268/keymaps/iso/keymap.c +++ b/keyboards/noxary/268/keymaps/iso/keymap.c @@ -54,11 +54,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(B6); - writePinHigh(B6); + gpio_set_pin_output(B6); + gpio_write_pin_high(B6); } else { - setPinInput(B6); - writePinLow(B6); + gpio_set_pin_input(B6); + gpio_write_pin_low(B6); } return false; } diff --git a/keyboards/orange75/keymaps/default/keymap.c b/keyboards/orange75/keymaps/default/keymap.c index 19321f289c..cf5deb9375 100644 --- a/keyboards/orange75/keymaps/default/keymap.c +++ b/keyboards/orange75/keymaps/default/keymap.c @@ -55,27 +55,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.num_lock) { - setPinOutput(B0); - writePinLow(B0); + gpio_set_pin_output(B0); + gpio_write_pin_low(B0); } else { - setPinInput(B0); - writePinLow(B0); + gpio_set_pin_input(B0); + gpio_write_pin_low(B0); } if (led_state.caps_lock) { - setPinOutput(B1); - writePinLow(B1); + gpio_set_pin_output(B1); + gpio_write_pin_low(B1); } else { - setPinInput(B1); - writePinLow(B1); + gpio_set_pin_input(B1); + gpio_write_pin_low(B1); } if (led_state.scroll_lock) { - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); } else { - setPinInput(B2); - writePinLow(B2); + gpio_set_pin_input(B2); + gpio_write_pin_low(B2); } return false; } diff --git a/keyboards/peej/lumberjack/keymaps/via/keymap.c b/keyboards/peej/lumberjack/keymaps/via/keymap.c index 018f284a4f..c46b868c63 100644 --- a/keyboards/peej/lumberjack/keymaps/via/keymap.c +++ b/keyboards/peej/lumberjack/keymaps/via/keymap.c @@ -50,23 +50,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void keyboard_pre_init_user() { - writePin(LED1, true); - writePin(LED2, true); + gpio_write_pin(LED1, true); + gpio_write_pin(LED2, true); } void keyboard_post_init_user() { - writePin(LED1, false); - writePin(LED2, false); + gpio_write_pin(LED1, false); + gpio_write_pin(LED2, false); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - writePin(LED1, record->event.pressed); + gpio_write_pin(LED1, record->event.pressed); return true; } layer_state_t layer_state_set_user(layer_state_t state) { - writePin(LED2, state); + gpio_write_pin(LED2, state); return state; } diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 93ee919923..5b2b83df1a 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -210,12 +210,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { backlight_step(); #endif #ifdef KEYBOARD_planck_rev5 - writePinLow(E6); + gpio_write_pin_low(E6); #endif } else { unregister_code(KC_RSFT); #ifdef KEYBOARD_planck_rev5 - writePinHigh(E6); + gpio_write_pin_high(E6); #endif } return false; diff --git a/keyboards/playkbtw/pk60/keymaps/default/keymap.c b/keyboards/playkbtw/pk60/keymaps/default/keymap.c index d8c61edf14..c5d9da63bc 100644 --- a/keyboards/playkbtw/pk60/keymaps/default/keymap.c +++ b/keyboards/playkbtw/pk60/keymaps/default/keymap.c @@ -22,11 +22,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(F4); - writePinLow(F4); + gpio_set_pin_output(F4); + gpio_write_pin_low(F4); } else { - setPinInput(F4); - writePinLow(F4); + gpio_set_pin_input(F4); + gpio_write_pin_low(F4); } return false; } diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 12bec41a85..511ac41f20 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -216,12 +216,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rgblight_step(); #endif #ifdef __AVR__ - writePinLow(E6); + gpio_write_pin_low(E6); #endif } else { unregister_code(KC_RSFT); #ifdef __AVR__ - writePinHigh(E6); + gpio_write_pin_high(E6); #endif } return false; diff --git a/keyboards/primekb/prime_e/keymaps/default/keymap.c b/keyboards/primekb/prime_e/keymaps/default/keymap.c index e5e47cffc2..0178efba2e 100644 --- a/keyboards/primekb/prime_e/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/default/keymap.c @@ -47,26 +47,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { // set CapsLock LED to output and low - setPinOutput(B1); - writePinLow(B1); + gpio_set_pin_output(B1); + gpio_write_pin_low(B1); // set NumLock LED to output and low - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); // set ScrollLock LED to output and low - setPinOutput(B3); - writePinLow(B3); + gpio_set_pin_output(B3); + gpio_write_pin_low(B3); } bool led_update_user(led_t led_state) { if (led_state.num_lock) { - writePinHigh(B2); + gpio_write_pin_high(B2); } else { - writePinLow(B2); + gpio_write_pin_low(B2); } if (led_state.caps_lock) { - writePinHigh(B1); + gpio_write_pin_high(B1); } else { - writePinLow(B1); + gpio_write_pin_low(B1); } return false; } @@ -75,9 +75,9 @@ bool led_update_user(led_t led_state) { layer_state_t layer_state_set_user(layer_state_t state) { if (get_highest_layer(state) == 1) { - writePinHigh(B3); + gpio_write_pin_high(B3); } else { - writePinLow(B3); + gpio_write_pin_low(B3); } return state; } diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c index 09a42b0d16..b8d2c24797 100644 --- a/keyboards/primekb/prime_e/keymaps/via/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c @@ -75,26 +75,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { // set CapsLock LED to output and low - setPinOutput(B1); - writePinLow(B1); + gpio_set_pin_output(B1); + gpio_write_pin_low(B1); // set NumLock LED to output and low - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); // set ScrollLock LED to output and low - setPinOutput(B3); - writePinLow(B3); + gpio_set_pin_output(B3); + gpio_write_pin_low(B3); } bool led_update_user(led_t led_state) { if (led_state.num_lock) { - writePinHigh(B2); + gpio_write_pin_high(B2); } else { - writePinLow(B2); + gpio_write_pin_low(B2); } if (led_state.caps_lock) { - writePinHigh(B1); + gpio_write_pin_high(B1); } else { - writePinLow(B1); + gpio_write_pin_low(B1); } return false; } @@ -103,9 +103,9 @@ bool led_update_user(led_t led_state) { layer_state_t layer_state_set_user(layer_state_t state) { if (get_highest_layer(state) == 1) { - writePinHigh(B3); + gpio_write_pin_high(B3); } else { - writePinLow(B3); + gpio_write_pin_low(B3); } return state; } diff --git a/keyboards/punk75/keymaps/default/keymap.c b/keyboards/punk75/keymaps/default/keymap.c index c867e0e493..9a6ef29307 100644 --- a/keyboards/punk75/keymaps/default/keymap.c +++ b/keyboards/punk75/keymaps/default/keymap.c @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { // When a key is pressed turn on the LED, when released turn it off - writePin(led_pin, record->event.pressed); + gpio_write_pin(led_pin, record->event.pressed); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/punk75/keymaps/via/keymap.c b/keyboards/punk75/keymaps/via/keymap.c index e284c525b6..72ef91fd37 100644 --- a/keyboards/punk75/keymaps/via/keymap.c +++ b/keyboards/punk75/keymaps/via/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { // When a key is pressed turn on the LED, when released turn it off - writePin(led_pin, record->event.pressed); + gpio_write_pin(led_pin, record->event.pressed); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/swiftrax/retropad/keymaps/default/keymap.c b/keyboards/swiftrax/retropad/keymaps/default/keymap.c index 6fd2ff5daa..fcbe1ededd 100644 --- a/keyboards/swiftrax/retropad/keymaps/default/keymap.c +++ b/keyboards/swiftrax/retropad/keymaps/default/keymap.c @@ -51,20 +51,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) { void matrix_init_user(void) { // set top LED to output and off (active low) - setPinOutput(D5); - writePinHigh(D5); + gpio_set_pin_output(D5); + gpio_write_pin_high(D5); // set middle LED to output and off (active low) - setPinOutput(D4); - writePinHigh(D4); + gpio_set_pin_output(D4); + gpio_write_pin_high(D4); // set bottom LED to output and off (active low) - setPinOutput(D3); - writePinHigh(D3); + gpio_set_pin_output(D3); + gpio_write_pin_high(D3); } // write to above indicators in a binary fashion based on current layer layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D5, get_highest_layer(state)); - writePin(D4, !layer_state_cmp(state, 1)); - writePin(D3, !layer_state_cmp(state, 2)); + gpio_write_pin(D5, get_highest_layer(state)); + gpio_write_pin(D4, !layer_state_cmp(state, 1)); + gpio_write_pin(D3, !layer_state_cmp(state, 2)); return state; } diff --git a/keyboards/swiftrax/retropad/keymaps/via/keymap.c b/keyboards/swiftrax/retropad/keymaps/via/keymap.c index 6fd2ff5daa..fcbe1ededd 100644 --- a/keyboards/swiftrax/retropad/keymaps/via/keymap.c +++ b/keyboards/swiftrax/retropad/keymaps/via/keymap.c @@ -51,20 +51,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) { void matrix_init_user(void) { // set top LED to output and off (active low) - setPinOutput(D5); - writePinHigh(D5); + gpio_set_pin_output(D5); + gpio_write_pin_high(D5); // set middle LED to output and off (active low) - setPinOutput(D4); - writePinHigh(D4); + gpio_set_pin_output(D4); + gpio_write_pin_high(D4); // set bottom LED to output and off (active low) - setPinOutput(D3); - writePinHigh(D3); + gpio_set_pin_output(D3); + gpio_write_pin_high(D3); } // write to above indicators in a binary fashion based on current layer layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D5, get_highest_layer(state)); - writePin(D4, !layer_state_cmp(state, 1)); - writePin(D3, !layer_state_cmp(state, 2)); + gpio_write_pin(D5, get_highest_layer(state)); + gpio_write_pin(D4, !layer_state_cmp(state, 1)); + gpio_write_pin(D3, !layer_state_cmp(state, 2)); return state; } diff --git a/keyboards/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c index 0385f8bf17..831b872ef1 100644 --- a/keyboards/uk78/keymaps/default/keymap.c +++ b/keyboards/uk78/keymaps/default/keymap.c @@ -77,11 +77,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { if (led_state.caps_lock) { - setPinOutput(A3); - writePinHigh(A3); + gpio_set_pin_output(A3); + gpio_write_pin_high(A3); } else { - setPinInput(A3); - writePinLow(A3); + gpio_set_pin_input(A3); + gpio_write_pin_low(A3); } return false; } diff --git a/keyboards/viktus/at101_bh/keymaps/default/keymap.c b/keyboards/viktus/at101_bh/keymaps/default/keymap.c index cef4ad93cb..5e8fae3ccd 100644 --- a/keyboards/viktus/at101_bh/keymaps/default/keymap.c +++ b/keyboards/viktus/at101_bh/keymaps/default/keymap.c @@ -20,26 +20,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool led_update_user(led_t led_state) { - setPinOutput(B4); - setPinOutput(D6); - setPinOutput(D7); + gpio_set_pin_output(B4); + gpio_set_pin_output(D6); + gpio_set_pin_output(D7); if (led_state.num_lock) { - writePinHigh(D7); + gpio_write_pin_high(D7); } else { - writePinLow(D7); + gpio_write_pin_low(D7); } if (led_state.caps_lock) { - writePinHigh(B4); + gpio_write_pin_high(B4); } else { - writePinLow(B4); + gpio_write_pin_low(B4); } if (led_state.scroll_lock) { - writePinHigh(D6); + gpio_write_pin_high(D6); } else { - writePinLow(D6); + gpio_write_pin_low(D6); } return false; } diff --git a/keyboards/viktus/sp_mini/keymaps/default/keymap.c b/keyboards/viktus/sp_mini/keymaps/default/keymap.c index 939b545d0b..3e844b2c08 100644 --- a/keyboards/viktus/sp_mini/keymaps/default/keymap.c +++ b/keyboards/viktus/sp_mini/keymaps/default/keymap.c @@ -75,30 +75,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void keyboard_pre_init_user(void) { - setPinOutput(F5); // initialize F5 for LED - setPinOutput(F6); // initialize F6 for LED - setPinOutput(F7); // initialize F7 for LED + gpio_set_pin_output(F5); // initialize F5 for LED + gpio_set_pin_output(F6); // initialize F6 for LED + gpio_set_pin_output(F7); // initialize F7 for LED } layer_state_t layer_state_set_user(layer_state_t state) { - writePinLow(F5); - writePinLow(F6); - writePinLow(F7); + gpio_write_pin_low(F5); + gpio_write_pin_low(F6); + gpio_write_pin_low(F7); switch (get_highest_layer(state)) { case _FN1: - writePinHigh(F5); + gpio_write_pin_high(F5); break; case _FN2: - writePinHigh(F6); + gpio_write_pin_high(F6); break; case _FN3: // replace 'XXXX' with the layer or function name - writePinHigh(F7); + gpio_write_pin_high(F7); break; case KC_F24: - writePinHigh(F7); - writePinHigh(F5); - writePinHigh(F6); + gpio_write_pin_high(F7); + gpio_write_pin_high(F5); + gpio_write_pin_high(F6); break; } return state; diff --git a/keyboards/viktus/sp_mini/keymaps/via/keymap.c b/keyboards/viktus/sp_mini/keymaps/via/keymap.c index 7fd1eb0961..e9e626a467 100644 --- a/keyboards/viktus/sp_mini/keymaps/via/keymap.c +++ b/keyboards/viktus/sp_mini/keymaps/via/keymap.c @@ -75,38 +75,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void keyboard_pre_init_user(void) { - setPinOutput(F5); // initialize F5 for LED - setPinOutput(F6); // initialize F6 for LED - setPinOutput(F7); // initialize F7 for LED + gpio_set_pin_output(F5); // initialize F5 for LED + gpio_set_pin_output(F6); // initialize F6 for LED + gpio_set_pin_output(F7); // initialize F7 for LED } layer_state_t layer_state_set_user(layer_state_t state) { switch (get_highest_layer(state)) { case _FN1: - writePinHigh(F5); - writePinLow(F6); - writePinLow(F7); + gpio_write_pin_high(F5); + gpio_write_pin_low(F6); + gpio_write_pin_low(F7); break; case _FN2: - writePinHigh(F6); - writePinLow(F5); - writePinLow(F7); + gpio_write_pin_high(F6); + gpio_write_pin_low(F5); + gpio_write_pin_low(F7); break; case _FN3: // replace 'XXXX' with the layer or function name - writePinHigh(F7); - writePinLow(F5); - writePinLow(F6); + gpio_write_pin_high(F7); + gpio_write_pin_low(F5); + gpio_write_pin_low(F6); break; case KC_F24: - writePinHigh(F7); - writePinHigh(F5); - writePinHigh(F6); + gpio_write_pin_high(F7); + gpio_write_pin_high(F5); + gpio_write_pin_high(F6); break; default: - writePinLow(F5); - writePinLow(F6); - writePinLow(F7); + gpio_write_pin_low(F5); + gpio_write_pin_low(F6); + gpio_write_pin_low(F7); break; } return state; diff --git a/keyboards/walletburner/cajal/keymaps/default/keymap.c b/keyboards/walletburner/cajal/keymaps/default/keymap.c index 4586e5695b..3851bc806c 100644 --- a/keyboards/walletburner/cajal/keymaps/default/keymap.c +++ b/keyboards/walletburner/cajal/keymaps/default/keymap.c @@ -49,38 +49,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Initialize indicator LEDs void matrix_init_user(void) { - setPinOutput(B5); - writePinLow(B5); - setPinOutput(B6); - writePinLow(B6); - setPinOutput(B7); - writePinLow(B7); + gpio_set_pin_output(B5); + gpio_write_pin_low(B5); + gpio_set_pin_output(B6); + gpio_write_pin_low(B6); + gpio_set_pin_output(B7); + gpio_write_pin_low(B7); } layer_state_t layer_state_set_user(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(B7); - writePinLow(B6); + gpio_write_pin_high(B7); + gpio_write_pin_low(B6); break; case 2: - writePinLow(B7); - writePinHigh(B6); + gpio_write_pin_low(B7); + gpio_write_pin_high(B6); break; case 3: - writePinHigh(B7); - writePinHigh(B6); + gpio_write_pin_high(B7); + gpio_write_pin_high(B6); break; default: - writePinLow(B7); - writePinLow(B6); + gpio_write_pin_low(B7); + gpio_write_pin_low(B6); break; } return state; } bool led_update_user(led_t led_state) { - writePin(B5, led_state.caps_lock); + gpio_write_pin(B5, led_state.caps_lock); return false; } diff --git a/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c b/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c index 87575e492f..2947f31ca8 100644 --- a/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c +++ b/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c @@ -49,34 +49,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Initialize indicator LEDs void matrix_init_user(void) { - setPinOutput(B5); - writePinLow(B5); - setPinOutput(B6); - writePinLow(B6); - setPinOutput(B7); - writePinLow(B7); + gpio_set_pin_output(B5); + gpio_write_pin_low(B5); + gpio_set_pin_output(B6); + gpio_write_pin_low(B6); + gpio_set_pin_output(B7); + gpio_write_pin_low(B7); } layer_state_t layer_state_set_user(layer_state_t state) { - writePinLow(B7); - writePinLow(B6); + gpio_write_pin_low(B7); + gpio_write_pin_low(B6); switch (get_highest_layer(state)) { case 1: - writePinHigh(B7); + gpio_write_pin_high(B7); break; case 2: - writePinHigh(B6); + gpio_write_pin_high(B6); break; case 3: - writePinHigh(B7); - writePinHigh(B6); + gpio_write_pin_high(B7); + gpio_write_pin_high(B6); break; } return state; } bool led_update_user(led_t led_state) { - writePin(B5, led_state.caps_lock); + gpio_write_pin(B5, led_state.caps_lock); return false; } diff --git a/keyboards/walletburner/cajal/keymaps/via/keymap.c b/keyboards/walletburner/cajal/keymaps/via/keymap.c index 246bbfa246..e104a19575 100644 --- a/keyboards/walletburner/cajal/keymaps/via/keymap.c +++ b/keyboards/walletburner/cajal/keymaps/via/keymap.c @@ -49,38 +49,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Initialize indicator LEDs void matrix_init_user(void) { - setPinOutput(B5); - writePinLow(B5); - setPinOutput(B6); - writePinLow(B6); - setPinOutput(B7); - writePinLow(B7); + gpio_set_pin_output(B5); + gpio_write_pin_low(B5); + gpio_set_pin_output(B6); + gpio_write_pin_low(B6); + gpio_set_pin_output(B7); + gpio_write_pin_low(B7); } layer_state_t layer_state_set_user(layer_state_t state) { switch (get_highest_layer(state)) { case 1: - writePinHigh(B7); - writePinLow(B6); + gpio_write_pin_high(B7); + gpio_write_pin_low(B6); break; case 2: - writePinLow(B7); - writePinHigh(B6); + gpio_write_pin_low(B7); + gpio_write_pin_high(B6); break; case 3: - writePinHigh(B7); - writePinHigh(B6); + gpio_write_pin_high(B7); + gpio_write_pin_high(B6); break; default: - writePinLow(B7); - writePinLow(B6); + gpio_write_pin_low(B7); + gpio_write_pin_low(B6); break; } return state; } bool led_update_user(led_t led_state) { - writePin(B5, led_state.caps_lock); + gpio_write_pin(B5, led_state.caps_lock); return false; } diff --git a/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c index 9763abe369..baeda467e6 100644 --- a/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c +++ b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c @@ -54,13 +54,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool led_update_user(led_t led_state) { // Insert custom handling for CAPS_LOCK, NUM_LOCK, SCROLL_LOCK here if (led_state.num_lock) { - writePinHigh(F4); - writePinHigh(F1); - writePinHigh(F5); + gpio_write_pin_high(F4); + gpio_write_pin_high(F1); + gpio_write_pin_high(F5); } else { - writePinLow(F4); - writePinLow(F1); - writePinLow(F5); + gpio_write_pin_low(F4); + gpio_write_pin_low(F1); + gpio_write_pin_low(F5); } return false; } diff --git a/keyboards/work_louder/work_board/keymaps/via/keymap.c b/keyboards/work_louder/work_board/keymaps/via/keymap.c index 7f0627eb67..255ee3ed78 100644 --- a/keyboards/work_louder/work_board/keymaps/via/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/via/keymap.c @@ -114,20 +114,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } layer_state_t layer_state_set_user(layer_state_t state) { - writePinLow(B2); - writePinLow(B3); - writePinLow(B7); + gpio_write_pin_low(B2); + gpio_write_pin_low(B3); + gpio_write_pin_low(B7); if (work_louder_config.led_level) { switch (get_highest_layer(state)) { case 1: - writePinHigh(B2); + gpio_write_pin_high(B2); break; case 2: - writePinHigh(B3); + gpio_write_pin_high(B3); break; case 3: - writePinHigh(B7); + gpio_write_pin_high(B7); break; } } diff --git a/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c b/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c index 54ff0f9df5..d1e5f62d4a 100644 --- a/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c +++ b/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c @@ -56,26 +56,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { switch (get_highest_layer(state)) { case _FN: - writePinHigh(D3); - writePinLow(D2); + gpio_write_pin_high(D3); + gpio_write_pin_low(D2); break; case _FNCHAR: - writePinLow(D3); - writePinHigh(D2); + gpio_write_pin_low(D3); + gpio_write_pin_high(D2); break; case _FKEYS: - writePinHigh(D3); - writePinHigh(D2); + gpio_write_pin_high(D3); + gpio_write_pin_high(D2); break; default: // for any other layers, or the default layer - writePinLow(D3); - writePinLow(D2); + gpio_write_pin_low(D3); + gpio_write_pin_low(D2); break; } return state; } bool led_update_user(led_t led_state) { - writePin(D0, led_state.caps_lock); + gpio_write_pin(D0, led_state.caps_lock); return false; } diff --git a/keyboards/wsk/gothic50/keymaps/default/keymap.c b/keyboards/wsk/gothic50/keymaps/default/keymap.c index 71ad616eb6..de3288b4e6 100644 --- a/keyboards/wsk/gothic50/keymaps/default/keymap.c +++ b/keyboards/wsk/gothic50/keymaps/default/keymap.c @@ -32,21 +32,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { // set CapsLock LED to output and low - setPinOutput(F6); - writePinLow(F6); + gpio_set_pin_output(F6); + gpio_write_pin_low(F6); // set NumLock LED to output and low - setPinOutput(F5); - writePinLow(F5); + gpio_set_pin_output(F5); + gpio_write_pin_low(F5); // set ScrollLock LED to output and low - setPinOutput(F4); - writePinLow(F4); + gpio_set_pin_output(F4); + gpio_write_pin_low(F4); } layer_state_t layer_state_set_user(layer_state_t state) { - writePin(F4, (state & 0x1)); - writePin(F5, (state & 0x2)); - writePin(F6, (state & 0x4)); + gpio_write_pin(F4, (state & 0x1)); + gpio_write_pin(F5, (state & 0x2)); + gpio_write_pin(F6, (state & 0x4)); return state; } diff --git a/keyboards/wsk/gothic70/keymaps/default/keymap.c b/keyboards/wsk/gothic70/keymaps/default/keymap.c index 589b30c4ef..cbc40bb93b 100644 --- a/keyboards/wsk/gothic70/keymaps/default/keymap.c +++ b/keyboards/wsk/gothic70/keymaps/default/keymap.c @@ -42,22 +42,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { // set CapsLock LED to output and off (active low) - setPinOutput(F5); - writePinHigh(F5); + gpio_set_pin_output(F5); + gpio_write_pin_high(F5); // set NumLock LED to output and off (active low) - setPinOutput(F6); - writePinHigh(F6); + gpio_set_pin_output(F6); + gpio_write_pin_high(F6); // set ScrollLock LED to output and off (active low) - setPinOutput(F7); - writePinHigh(F7); + gpio_set_pin_output(F7); + gpio_write_pin_high(F7); } // write to above indicators in a binary fashion based on current layer layer_state_t layer_state_set_user(layer_state_t state) { - writePin(F5, (state & 0x1)); - writePin(F6, (state & 0x2)); - writePin(F7, (state & 0x4)); + gpio_write_pin(F5, (state & 0x1)); + gpio_write_pin(F6, (state & 0x2)); + gpio_write_pin(F7, (state & 0x4)); return state; } diff --git a/keyboards/wsk/gothic70/keymaps/via/keymap.c b/keyboards/wsk/gothic70/keymaps/via/keymap.c index 3f72979b92..6b511a94b1 100644 --- a/keyboards/wsk/gothic70/keymaps/via/keymap.c +++ b/keyboards/wsk/gothic70/keymaps/via/keymap.c @@ -59,18 +59,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { // set CapsLock LED to output and off (active high) - setPinOutput(F5); + gpio_set_pin_output(F5); // set NumLock LED to output and off (active high) - setPinOutput(F6); + gpio_set_pin_output(F6); // set ScrollLock LED to output and off (active high) - setPinOutput(F7); + gpio_set_pin_output(F7); } // write to above indicators in a binary fashion based on current layer layer_state_t layer_state_set_user(layer_state_t state) { - writePin(F5, (state & 0x1)); - writePin(F6, (state & 0x2)); - writePin(F7, (state & 0x4)); + gpio_write_pin(F5, (state & 0x1)); + gpio_write_pin(F6, (state & 0x2)); + gpio_write_pin(F7, (state & 0x4)); return state; } diff --git a/keyboards/wsk/jerkin/keymaps/default/keymap.c b/keyboards/wsk/jerkin/keymaps/default/keymap.c index 046d703c39..64bec404a2 100644 --- a/keyboards/wsk/jerkin/keymaps/default/keymap.c +++ b/keyboards/wsk/jerkin/keymaps/default/keymap.c @@ -39,27 +39,27 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { // set CapsLock LED to output and low - setPinOutput(B2); - writePinLow(B2); + gpio_set_pin_output(B2); + gpio_write_pin_low(B2); // set NumLock LED to output and low - setPinOutput(B6); - writePinLow(B6); + gpio_set_pin_output(B6); + gpio_write_pin_low(B6); } layer_state_t layer_state_set_user(layer_state_t state) { if (layer_state_cmp(state, 1)) { - writePinHigh(B2); + gpio_write_pin_high(B2); } else if (state & (1<<2)) { - writePinLow(B2); - writePinHigh(B6); + gpio_write_pin_low(B2); + gpio_write_pin_high(B6); } else if (state & (1<<3)) { - writePinHigh(B2); - writePinHigh(B6); + gpio_write_pin_high(B2); + gpio_write_pin_high(B6); } else { - writePinLow(B2); - writePinLow(B6); + gpio_write_pin_low(B2); + gpio_write_pin_low(B6); } return state; } diff --git a/keyboards/zsa/voyager/matrix.c b/keyboards/zsa/voyager/matrix.c index 614c3ffa04..931af40bc8 100644 --- a/keyboards/zsa/voyager/matrix.c +++ b/keyboards/zsa/voyager/matrix.c @@ -116,7 +116,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { matrix_io_delay(); } // read col data - data = ((readPin(A0) << 0) | (readPin(A1) << 1) | (readPin(A2) << 2) | (readPin(A3) << 3) | (readPin(A6) << 4) | (readPin(A7) << 5) | (readPin(B0) << 6)); + data = ((gpio_read_pin(A0) << 0) | (gpio_read_pin(A1) << 1) | (gpio_read_pin(A2) << 2) | (gpio_read_pin(A3) << 3) | (gpio_read_pin(A6) << 4) | (gpio_read_pin(A7) << 5) | (gpio_read_pin(B0) << 6)); // unstrobe row switch (row) { case 0: