From 753d9c43ca615f552c3a2a008a538b6fa39c85d8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 27 Mar 2024 16:26:29 +1100 Subject: [PATCH] Update GPIO API usage in keyboard code - `writePin` --- .../4pplet/eagle_viper_rep/rev_a/rev_a.c | 16 +++++----- keyboards/acheron/athena/alpha/alpha.c | 4 +-- keyboards/acheron/athena/beta/beta.c | 4 +-- keyboards/acheron/austin/austin.c | 6 ++-- keyboards/acheron/elongate/delta/delta.c | 32 +++++++++---------- keyboards/aeboards/ext65/rev1/rev1.c | 6 ++-- keyboards/aeboards/ext65/rev2/rev2.c | 6 ++-- keyboards/ai03/orbit/orbit.c | 12 +++---- keyboards/ai03/vega/vega.c | 4 +-- keyboards/akko/5087/5087.c | 4 +-- keyboards/akko/5108/5108.c | 2 +- keyboards/atlantis/ps17/ps17.c | 12 +++---- keyboards/bear_face/v1/v1.c | 2 +- keyboards/bear_face/v2/v2.c | 2 +- keyboards/bioi/g60/g60.c | 2 +- keyboards/bioi/morgan65/morgan65.c | 2 +- keyboards/bioi/s65/s65.c | 2 +- keyboards/bobpad/bobpad.c | 2 +- keyboards/cheshire/curiosity/curiosity.c | 6 ++-- keyboards/cipulot/common/ec_switch_matrix.c | 2 +- keyboards/clueboard/2x1800/2019/2019.c | 6 ++-- keyboards/clueboard/66/rev4/rev4.c | 8 ++--- keyboards/dark/magnum_ergo_1/magnum_ergo_1.c | 32 +++++++++---------- .../kd83a_bfg_edition/kd83a_bfg_edition.c | 2 +- .../kd87a_bfg_edition/kd87a_bfg_edition.c | 2 +- keyboards/dm9records/lain/lain.c | 4 +-- keyboards/doppelganger/doppelganger.c | 6 ++-- keyboards/drop/lib/mux.c | 2 +- keyboards/duck/orion/v3/v3.c | 6 ++-- 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/dztech/bocc/bocc.c | 2 +- keyboards/ealdin/quadrant/quadrant.c | 2 +- keyboards/edda/edda.c | 24 +++++++------- .../commissions/mini1800/mini1800.c | 2 +- keyboards/evyd13/gh80_3700/gh80_3700.c | 2 +- keyboards/evyd13/pockettype/pockettype.c | 2 +- keyboards/exclusive/e6v2/oe/oe.c | 4 +-- keyboards/exclusive/e85/hotswap/hotswap.c | 4 +-- keyboards/exclusive/e85/soldered/soldered.c | 4 +-- keyboards/fjlabs/bolsa65/bolsa65.c | 2 +- keyboards/flx/virgo/virgo.c | 4 +-- keyboards/geonworks/ee_at/ee_at.c | 2 +- keyboards/geonworks/w1_at/w1_at.c | 2 +- keyboards/ghs/rar/rar.c | 4 +-- keyboards/gray_studio/think65/solder/solder.c | 2 +- keyboards/handwired/colorlice/colorlice.c | 8 ++--- keyboards/handwired/evk/v1_3/v1_3.c | 6 ++-- .../handwired/jtallbean/split_65/split_65.c | 4 +-- .../handwired/prime_exl_plus/prime_exl_plus.c | 6 ++-- keyboards/handwired/retro_refit/retro_refit.c | 6 ++-- keyboards/handwired/selene/selene.c | 6 ++-- keyboards/handwired/sono1/sono1.c | 6 ++-- .../symmetric70_proto/matrix_debug/matrix.c | 8 ++--- .../matrix_fast/matrix_extension_74hc15x.c | 4 +-- keyboards/handwired/z150/z150.c | 6 ++-- keyboards/heliar/wm1_hotswap/wm1_hotswap.c | 6 ++-- keyboards/hhkb/yang/yang.c | 4 +-- keyboards/hineybush/h10/h10.c | 2 +- keyboards/hineybush/h60/h60.c | 2 +- keyboards/hineybush/h87a/h87a.c | 4 +-- keyboards/hineybush/h88/h88.c | 4 +-- keyboards/hineybush/physix/physix.c | 6 ++-- .../ibm/model_m/ashpil_usbc/ashpil_usbc.c | 6 ++-- keyboards/ibm/model_m/modelh/modelh.c | 2 +- keyboards/ibm/model_m/mschwingen/mschwingen.c | 8 ++--- keyboards/ibm/model_m/teensypp/teensypp.c | 6 ++-- keyboards/ibm/model_m/yugo_m/yugo_m.c | 6 ++-- keyboards/ilumkb/volcano660/volcano660.c | 6 ++-- keyboards/jae/j01/j01.c | 2 +- keyboards/jels/jels88/jels88.c | 4 +-- keyboards/jian/nsrev2/config.h | 16 +++++----- keyboards/jian/rev1/config.h | 16 +++++----- keyboards/jian/rev2/config.h | 16 +++++----- keyboards/jukaie/jk01/jk01.c | 2 +- keyboards/kabedon/kabedon980/kabedon980.c | 2 +- keyboards/kbdfans/bella/soldered/soldered.c | 2 +- .../kbdfans/maja_soldered/maja_soldered.c | 2 +- keyboards/kbdmania/kmac/matrix.c | 10 +++--- keyboards/kc60se/kc60se.c | 2 +- keyboards/keebio/kbo5000/rev1/rev1.c | 2 +- keyboards/keebio/quefrency/rev2/rev2.c | 2 +- keyboards/keebio/quefrency/rev3/rev3.c | 2 +- keyboards/keebio/sinc/sinc.c | 2 +- keyboards/keyhive/lattice60/lattice60.c | 2 +- keyboards/kkatano/wallaby/wallaby.c | 4 +-- keyboards/kkatano/yurei/yurei.c | 4 +-- keyboards/kopibeng/mnk88/mnk88.c | 4 +-- keyboards/kopibeng/xt8x/xt8x.c | 6 ++-- keyboards/ktec/ergodone/ergodox_compat.h | 16 +++++----- keyboards/marksard/leftover30/leftover30.c | 4 +-- .../masterworks/classy_tkl/rev_a/rev_a.c | 4 +-- keyboards/matrix/cain_re/cain_re.c | 6 ++-- keyboards/matrix/m12og/rev2/rev2.c | 6 ++-- keyboards/mc_76k/mc_76k.c | 4 +-- keyboards/mechlovin/hannah910/hannah910.c | 2 +- keyboards/mechlovin/infinityce/infinityce.c | 2 +- keyboards/mechlovin/kanu/kanu.c | 8 ++--- keyboards/mechlovin/olly/bb/bb.c | 10 +++--- keyboards/mechlovin/olly/jf/rev1/rev1.c | 10 +++--- keyboards/mechlovin/olly/orion/orion.c | 10 +++--- keyboards/mechwild/sugarglider/sugarglider.c | 8 ++--- keyboards/miiiw/common/shift_register.c | 2 +- keyboards/mlego/m48/m48.h | 6 ++-- keyboards/mlego/m60/m60.h | 6 ++-- keyboards/mlego/m60_split/m60_split.h | 6 ++-- keyboards/mlego/m65/m65.h | 12 +++---- keyboards/mode/m65ha_alpha/m65ha_alpha.c | 4 +-- keyboards/mode/m65hi_alpha/m65hi_alpha.c | 4 +-- keyboards/mode/m65s/m65s.c | 4 +-- keyboards/monsgeek/m3/m3.c | 6 ++-- keyboards/monsgeek/m5/m5.c | 2 +- keyboards/neson_design/700e/700e.c | 2 +- keyboards/neson_design/n6/n6.c | 2 +- keyboards/novelkeys/nk65b/nk65b.c | 4 +-- keyboards/novelkeys/nk87b/nk87b.c | 4 +-- keyboards/noxary/220/220.c | 2 +- keyboards/noxary/268_2/268_2.c | 2 +- keyboards/noxary/280/280.c | 4 +-- keyboards/noxary/x268/x268.c | 2 +- keyboards/nullbitsco/common/bitc_led.c | 4 +-- keyboards/nullbitsco/nibble/big_led.c | 12 +++---- keyboards/nullbitsco/nibble/matrix.c | 2 +- keyboards/nullbitsco/scramble/v1/v1.c | 4 +-- keyboards/nullbitsco/snap/matrix.c | 2 +- keyboards/ortho5by12/ortho5by12.c | 4 +-- keyboards/peej/rosaline/rosaline.c | 4 +-- keyboards/percent/canoe_gen2/canoe_gen2.c | 2 +- keyboards/pom_keyboards/tnln95/tnln95.c | 4 +-- keyboards/primekb/meridian/meridian.c | 2 +- keyboards/projectkb/alice/alice.c | 6 ++-- keyboards/punk75/punk75.c | 2 +- keyboards/quad_h/lb75/lb75.c | 4 +-- keyboards/rart/rartlite/rartlite.c | 2 +- keyboards/redscarf_i/redscarf_i.c | 2 +- keyboards/rmi_kb/wete/v1/v1.c | 6 ++-- keyboards/rookiebwoy/neopad/rev1/rev1.c | 4 +-- keyboards/rubi/rubi.c | 2 +- keyboards/sekigon/grs_70ec/ec_switch_matrix.c | 6 ++-- keyboards/smithrune/iron165r2/iron165r2.c | 2 +- keyboards/sneakbox/aliceclone/aliceclone.c | 6 ++-- keyboards/sthlmkb/lagom/matrix.c | 2 +- keyboards/strech/soulstone/soulstone.c | 2 +- .../switchplate/southpaw_65/southpaw_65.c | 2 +- .../southpaw_fullsize/southpaw_fullsize.c | 6 ++-- keyboards/team0110/p1800fl/p1800fl.c | 6 ++-- keyboards/tkc/osav2/osav2.c | 6 ++-- keyboards/touchpad/matrix.c | 24 +++++++------- keyboards/tr60w/tr60w.c | 6 ++-- .../overnumpad_1xb/overnumpad_1xb.c | 6 ++-- .../overnumpad_1xb/overnumpad_1xb.c | 6 ++-- keyboards/viktus/minne_topre/ec.c | 6 ++-- keyboards/viktus/osav2_numpad_topre/ec.c | 6 ++-- keyboards/viktus/osav2_topre/ec.c | 6 ++-- keyboards/viktus/sp111/sp111.c | 6 ++-- keyboards/viktus/styrka_topre/ec.c | 6 ++-- keyboards/westfoxtrot/cypher/rev1/rev1.c | 8 ++--- keyboards/westfoxtrot/cypher/rev5/rev5.c | 8 ++--- keyboards/westfoxtrot/prophet/prophet.c | 4 +-- keyboards/wilba_tech/wt60_xt/wt60_xt.c | 2 +- keyboards/wilba_tech/wt69_a/wt69_a.c | 2 +- keyboards/wilba_tech/wt70_jb/wt70_jb.c | 2 +- keyboards/wolfmarkclub/wm1/wm1.c | 6 ++-- keyboards/work_louder/micro/micro.c | 12 +++---- keyboards/wsk/g4m3ralpha/g4m3ralpha.c | 6 ++-- keyboards/wuque/ikki68/ikki68.c | 2 +- .../yiancardesigns/barleycorn/barleycorn.c | 6 ++-- keyboards/ymdk/yd60mq/yd60mq.c | 4 +-- keyboards/zsa/moonlander/moonlander.h | 6 ++-- 174 files changed, 464 insertions(+), 464 deletions(-) diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c b/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c index 2971460bd21..3cf6783b8c1 100644 --- a/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c +++ b/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c @@ -28,19 +28,19 @@ bool led_update_kb(led_t led_state) { if(res && LOCK_LIGHTS) { if(led_state.caps_lock){ setPinOutput(CAPS_PIN); - writePin(CAPS_PIN, 0); + gpio_write_pin(CAPS_PIN, 0); } else setPinInputHigh(CAPS_PIN); if(led_state.scroll_lock){ setPinOutput(SCROLL_PIN); - writePin(SCROLL_PIN, 0); + gpio_write_pin(SCROLL_PIN, 0); } else setPinInputHigh(SCROLL_PIN); if(led_state.num_lock){ setPinOutput(NUM_PIN); - writePin(NUM_PIN, 0); + gpio_write_pin(NUM_PIN, 0); } else setPinInputHigh(NUM_PIN); @@ -60,7 +60,7 @@ void setLayerLed(layer_state_t state){ switch(get_highest_layer(state)){ case 0 : setPinOutput(LAYER_1); - writePin(LAYER_1, 0); + gpio_write_pin(LAYER_1, 0); setPinInputHigh(LAYER_2); setPinInputHigh(LAYER_3); setPinInputHigh(LAYER_4); @@ -68,7 +68,7 @@ void setLayerLed(layer_state_t state){ break; case 1 : setPinOutput(LAYER_2); - writePin(LAYER_2, 0); + gpio_write_pin(LAYER_2, 0); setPinInputHigh(LAYER_1); setPinInputHigh(LAYER_3); setPinInputHigh(LAYER_4); @@ -76,14 +76,14 @@ void setLayerLed(layer_state_t state){ break; case 2 : setPinOutput(LAYER_3); - writePin(LAYER_3, 0); + gpio_write_pin(LAYER_3, 0); setPinInputHigh(LAYER_1); setPinInputHigh(LAYER_2); setPinInputHigh(LAYER_4); setPinInputHigh(LAYER_5); break; case 3 : - writePin(LAYER_4, 0); + gpio_write_pin(LAYER_4, 0); setPinInputHigh(LAYER_5); setPinInputHigh(LAYER_1); setPinInputHigh(LAYER_2); @@ -92,7 +92,7 @@ void setLayerLed(layer_state_t state){ break; case 4 : setPinOutput(LAYER_5); - writePin(LAYER_5, 0); + gpio_write_pin(LAYER_5, 0); setPinInputHigh(LAYER_1); setPinInputHigh(LAYER_2); setPinInputHigh(LAYER_3); diff --git a/keyboards/acheron/athena/alpha/alpha.c b/keyboards/acheron/athena/alpha/alpha.c index 9e4f82f7ad1..0f4d251585b 100644 --- a/keyboards/acheron/athena/alpha/alpha.c +++ b/keyboards/acheron/athena/alpha/alpha.c @@ -34,10 +34,10 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); #ifdef CAPSLOCK_INDICATOR if(res) { - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); } #else - writePin(LED_CAPS_LOCK_PIN, 0); + gpio_write_pin(LED_CAPS_LOCK_PIN, 0); #endif return res; } diff --git a/keyboards/acheron/athena/beta/beta.c b/keyboards/acheron/athena/beta/beta.c index 9ad9c71cc88..4e6a7ce11c8 100644 --- a/keyboards/acheron/athena/beta/beta.c +++ b/keyboards/acheron/athena/beta/beta.c @@ -25,10 +25,10 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); #ifdef CAPSLOCK_INDICATOR if(res) { - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); } #else - writePin(LED_CAPS_LOCK_PIN, 0); + gpio_write_pin(LED_CAPS_LOCK_PIN, 0); #endif return res; } diff --git a/keyboards/acheron/austin/austin.c b/keyboards/acheron/austin/austin.c index 5c0a4f642d7..304bcc46025 100644 --- a/keyboards/acheron/austin/austin.c +++ b/keyboards/acheron/austin/austin.c @@ -10,9 +10,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(A2, led_state.num_lock); - writePin(A0, led_state.caps_lock); - writePin(A1, led_state.scroll_lock); + gpio_write_pin(A2, led_state.num_lock); + gpio_write_pin(A0, led_state.caps_lock); + gpio_write_pin(A1, led_state.scroll_lock); } return true; } diff --git a/keyboards/acheron/elongate/delta/delta.c b/keyboards/acheron/elongate/delta/delta.c index e621b4495b5..98b60bae614 100755 --- a/keyboards/acheron/elongate/delta/delta.c +++ b/keyboards/acheron/elongate/delta/delta.c @@ -30,18 +30,18 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED1_PIN, !led_state.num_lock); - writePin(LED2_PIN, !led_state.caps_lock); - writePin(LED3_PIN, !led_state.scroll_lock); + gpio_write_pin(LED1_PIN, !led_state.num_lock); + gpio_write_pin(LED2_PIN, !led_state.caps_lock); + gpio_write_pin(LED3_PIN, !led_state.scroll_lock); } return res; } // Turns off all bottom LEDs void turn_off_bottom_leds(void){ - writePin(LED4_PIN, 1); - writePin(LED5_PIN, 1); - writePin(LED6_PIN, 1); + gpio_write_pin(LED4_PIN, 1); + gpio_write_pin(LED5_PIN, 1); + gpio_write_pin(LED6_PIN, 1); } /* @@ -53,19 +53,19 @@ layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { // The base layer, or layer zero, will be handled by the default case. case 1: - writePin(LED4_PIN, 1); - writePin(LED5_PIN, 0); - writePin(LED6_PIN, 1); + gpio_write_pin(LED4_PIN, 1); + gpio_write_pin(LED5_PIN, 0); + gpio_write_pin(LED6_PIN, 1); break; case 2: - writePin(LED4_PIN, 1); - writePin(LED5_PIN, 1); - writePin(LED6_PIN, 0); + gpio_write_pin(LED4_PIN, 1); + gpio_write_pin(LED5_PIN, 1); + gpio_write_pin(LED6_PIN, 0); break; default: - writePin(LED4_PIN, 0); - writePin(LED5_PIN, 1); - writePin(LED6_PIN, 1); + gpio_write_pin(LED4_PIN, 0); + gpio_write_pin(LED5_PIN, 1); + gpio_write_pin(LED6_PIN, 1); break; } return state; @@ -73,5 +73,5 @@ layer_state_t layer_state_set_kb(layer_state_t state) { // Since the keyboard starts at layer 0, the init function starts LED4 as lit up. void keyboard_post_init_kb(void){ - writePin(LED4_PIN, 0); + gpio_write_pin(LED4_PIN, 0); } diff --git a/keyboards/aeboards/ext65/rev1/rev1.c b/keyboards/aeboards/ext65/rev1/rev1.c index fa26ee1e400..21b1efa1fb4 100644 --- a/keyboards/aeboards/ext65/rev1/rev1.c +++ b/keyboards/aeboards/ext65/rev1/rev1.c @@ -28,9 +28,9 @@ void keyboard_pre_init_user(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D5, led_state.num_lock); - writePin(D3, led_state.caps_lock); - writePin(D2, led_state.scroll_lock); + gpio_write_pin(D5, led_state.num_lock); + gpio_write_pin(D3, led_state.caps_lock); + gpio_write_pin(D2, led_state.scroll_lock); } return res; } diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index 8221c12d3e1..b6eb408ce5e 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -82,9 +82,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(B4, led_state.num_lock); - writePin(B3, led_state.caps_lock); - writePin(A15, led_state.scroll_lock); + gpio_write_pin(B4, led_state.num_lock); + gpio_write_pin(B3, led_state.caps_lock); + gpio_write_pin(A15, led_state.scroll_lock); } return res; } diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c index 5097f9cd90a..385188c1f50 100644 --- a/keyboards/ai03/orbit/orbit.c +++ b/keyboards/ai03/orbit/orbit.c @@ -40,15 +40,15 @@ void led_toggle(uint8_t id, bool on) { switch (id) { case 0: // Left hand C6 - writePin(C6, on); + gpio_write_pin(C6, on); break; case 1: // Left hand B6 - writePin(B6, on); + gpio_write_pin(B6, on); break; case 2: // Left hand B5 - writePin(B5, on); + gpio_write_pin(B5, on); break; default: break; @@ -57,15 +57,15 @@ void led_toggle(uint8_t id, bool on) { switch (id) { case 3: // Right hand F6 - writePin(F6, on); + gpio_write_pin(F6, on); break; case 4: // Right hand F7 - writePin(F7, on); + gpio_write_pin(F7, on); break; case 5: // Right hand C7 - writePin(C7, on); + gpio_write_pin(C7, on); break; default: break; diff --git a/keyboards/ai03/vega/vega.c b/keyboards/ai03/vega/vega.c index 6ed1651e508..f4aa46cca92 100644 --- a/keyboards/ai03/vega/vega.c +++ b/keyboards/ai03/vega/vega.c @@ -30,8 +30,8 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B7, !led_state.caps_lock); - writePin(A5, !led_state.scroll_lock); + gpio_write_pin(B7, !led_state.caps_lock); + gpio_write_pin(A5, !led_state.scroll_lock); } return res; } \ No newline at end of file diff --git a/keyboards/akko/5087/5087.c b/keyboards/akko/5087/5087.c index a34907249fa..96a6da26b3e 100644 --- a/keyboards/akko/5087/5087.c +++ b/keyboards/akko/5087/5087.c @@ -146,8 +146,8 @@ void matrix_init_kb(void) { } void housekeeping_task_kb(void){ - writePin(LED_MAC_OS_PIN, (get_highest_layer(default_layer_state) == 3)); - writePin(LED_WIN_LOCK_PIN, keymap_config.no_gui); + gpio_write_pin(LED_MAC_OS_PIN, (get_highest_layer(default_layer_state) == 3)); + gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui); } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { diff --git a/keyboards/akko/5108/5108.c b/keyboards/akko/5108/5108.c index 76a4489c296..035c596bb10 100644 --- a/keyboards/akko/5108/5108.c +++ b/keyboards/akko/5108/5108.c @@ -156,7 +156,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(LED_WIN_LOCK_PIN, keymap_config.no_gui); + gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui); } return res; } diff --git a/keyboards/atlantis/ps17/ps17.c b/keyboards/atlantis/ps17/ps17.c index d660bdee6a9..e963ca233d2 100644 --- a/keyboards/atlantis/ps17/ps17.c +++ b/keyboards/atlantis/ps17/ps17.c @@ -5,9 +5,9 @@ layer_state_t layer_state_set_kb(layer_state_t state) { /* Display current layer using indicator LEDs */ - writePin(LED_INDICATOR_0_PIN, !IS_LAYER_ON_STATE(state, 1)); - writePin(LED_INDICATOR_1_PIN, !IS_LAYER_ON_STATE(state, 2)); - writePin(LED_INDICATOR_2_PIN, !IS_LAYER_ON_STATE(state, 3)); + gpio_write_pin(LED_INDICATOR_0_PIN, !IS_LAYER_ON_STATE(state, 1)); + gpio_write_pin(LED_INDICATOR_1_PIN, !IS_LAYER_ON_STATE(state, 2)); + gpio_write_pin(LED_INDICATOR_2_PIN, !IS_LAYER_ON_STATE(state, 3)); return layer_state_set_user(state); } @@ -22,9 +22,9 @@ void keyboard_pre_init_kb(void) { #ifdef RGB_MATRIX_ENABLE void suspend_power_down_kb(void) { /* Disable indicator LEDs when going to sleep */ - writePin(LED_INDICATOR_0_PIN, 1); - writePin(LED_INDICATOR_1_PIN, 1); - writePin(LED_INDICATOR_2_PIN, 1); + gpio_write_pin(LED_INDICATOR_0_PIN, 1); + gpio_write_pin(LED_INDICATOR_1_PIN, 1); + gpio_write_pin(LED_INDICATOR_2_PIN, 1); suspend_power_down_user(); } diff --git a/keyboards/bear_face/v1/v1.c b/keyboards/bear_face/v1/v1.c index f4960d91786..162a64b7fad 100644 --- a/keyboards/bear_face/v1/v1.c +++ b/keyboards/bear_face/v1/v1.c @@ -28,7 +28,7 @@ bool led_update_kb(led_t led_state) { // Caps Lock LED indicator toggling code here bool res = led_update_user(led_state); if(res) { - writePin(F7, led_state.caps_lock); + gpio_write_pin(F7, led_state.caps_lock); } return res; } diff --git a/keyboards/bear_face/v2/v2.c b/keyboards/bear_face/v2/v2.c index f4960d91786..162a64b7fad 100644 --- a/keyboards/bear_face/v2/v2.c +++ b/keyboards/bear_face/v2/v2.c @@ -28,7 +28,7 @@ bool led_update_kb(led_t led_state) { // Caps Lock LED indicator toggling code here bool res = led_update_user(led_state); if(res) { - writePin(F7, led_state.caps_lock); + gpio_write_pin(F7, led_state.caps_lock); } return res; } diff --git a/keyboards/bioi/g60/g60.c b/keyboards/bioi/g60/g60.c index 84226a336af..9b56a67cbcb 100644 --- a/keyboards/bioi/g60/g60.c +++ b/keyboards/bioi/g60/g60.c @@ -22,7 +22,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(F0, !led_state.caps_lock); + gpio_write_pin(F0, !led_state.caps_lock); } return true; } diff --git a/keyboards/bioi/morgan65/morgan65.c b/keyboards/bioi/morgan65/morgan65.c index 84226a336af..9b56a67cbcb 100644 --- a/keyboards/bioi/morgan65/morgan65.c +++ b/keyboards/bioi/morgan65/morgan65.c @@ -22,7 +22,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(F0, !led_state.caps_lock); + gpio_write_pin(F0, !led_state.caps_lock); } return true; } diff --git a/keyboards/bioi/s65/s65.c b/keyboards/bioi/s65/s65.c index 4f4e5c5f418..36efa49cddd 100644 --- a/keyboards/bioi/s65/s65.c +++ b/keyboards/bioi/s65/s65.c @@ -21,7 +21,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(F0, !led_state.caps_lock); + gpio_write_pin(F0, !led_state.caps_lock); } return true; } diff --git a/keyboards/bobpad/bobpad.c b/keyboards/bobpad/bobpad.c index 67b124ace20..83b4dbaad00 100644 --- a/keyboards/bobpad/bobpad.c +++ b/keyboards/bobpad/bobpad.c @@ -19,7 +19,7 @@ bool led_update_kb(led_t led_state) { if (!led_update_user(led_state)) { return false; } - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); return true; }; diff --git a/keyboards/cheshire/curiosity/curiosity.c b/keyboards/cheshire/curiosity/curiosity.c index 9db2651e941..52dfc45e999 100644 --- a/keyboards/cheshire/curiosity/curiosity.c +++ b/keyboards/cheshire/curiosity/curiosity.c @@ -9,9 +9,9 @@ void matrix_init_board(void){ bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); if (runDefault) { - writePin(A8, !led_state.num_lock); - writePin(A9, !led_state.caps_lock); - writePin(A10, !led_state.scroll_lock); + gpio_write_pin(A8, !led_state.num_lock); + gpio_write_pin(A9, !led_state.caps_lock); + gpio_write_pin(A10, !led_state.scroll_lock); } return runDefault; } diff --git a/keyboards/cipulot/common/ec_switch_matrix.c b/keyboards/cipulot/common/ec_switch_matrix.c index 346e082cee0..e4aa9701e62 100644 --- a/keyboards/cipulot/common/ec_switch_matrix.c +++ b/keyboards/cipulot/common/ec_switch_matrix.c @@ -78,7 +78,7 @@ void select_amux_channel(uint8_t channel, uint8_t col) { 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)); + gpio_write_pin(amux_sel_pins[i], ch & (1 << i)); } // re enable specified multiplexer gpio_write_pin_low(amux_en_pins[channel]); diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c index 9a0944891a4..db28013ecdd 100644 --- a/keyboards/clueboard/2x1800/2019/2019.c +++ b/keyboards/clueboard/2x1800/2019/2019.c @@ -136,9 +136,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B4, !led_state.num_lock); - writePin(B5, !led_state.caps_lock); - writePin(B6, !led_state.scroll_lock); + gpio_write_pin(B4, !led_state.num_lock); + gpio_write_pin(B5, !led_state.caps_lock); + gpio_write_pin(B6, !led_state.scroll_lock); } return res; diff --git a/keyboards/clueboard/66/rev4/rev4.c b/keyboards/clueboard/66/rev4/rev4.c index 0a4f0448450..edbd2ac6306 100644 --- a/keyboards/clueboard/66/rev4/rev4.c +++ b/keyboards/clueboard/66/rev4/rev4.c @@ -15,10 +15,10 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B13, led_state.num_lock); - writePin(A0, led_state.caps_lock); - writePin(B14, led_state.caps_lock); - writePin(A8, led_state.scroll_lock); + gpio_write_pin(B13, led_state.num_lock); + gpio_write_pin(A0, led_state.caps_lock); + gpio_write_pin(B14, led_state.caps_lock); + gpio_write_pin(A8, led_state.scroll_lock); } return res; } diff --git a/keyboards/dark/magnum_ergo_1/magnum_ergo_1.c b/keyboards/dark/magnum_ergo_1/magnum_ergo_1.c index 9125410df05..36ee9e7f752 100644 --- a/keyboards/dark/magnum_ergo_1/magnum_ergo_1.c +++ b/keyboards/dark/magnum_ergo_1/magnum_ergo_1.c @@ -24,27 +24,27 @@ void keyoard_post_init_kb(void) { setPinOutput(LED_INDICATOR_4); setPinOutput(LED_INDICATOR_5); #ifndef LED_CAPS_LOCK_PIN - writePin(LED_CAPS_LOCK_PIN, 0); + gpio_write_pin(LED_CAPS_LOCK_PIN, 0); #endif #ifndef LED_INDICATOR_1 - writePin(LED_INDICATOR_1, 0); + gpio_write_pin(LED_INDICATOR_1, 0); #endif #ifndef LED_INDICATOR_2 - writePin(LED_INDICATOR_2, 0); + gpio_write_pin(LED_INDICATOR_2, 0); #endif #ifndef LED_INDICATOR_3 - writePin(LED_INDICATOR_3, 0); + gpio_write_pin(LED_INDICATOR_3, 0); #endif #ifndef LED_INDICATOR_4 - writePin(LED_INDICATOR_4, 0); + gpio_write_pin(LED_INDICATOR_4, 0); #endif #ifndef LED_INDICATOR_5 - writePin(LED_INDICATOR_5, 0); + gpio_write_pin(LED_INDICATOR_5, 0); #endif keyboard_post_init_user(); } @@ -53,39 +53,39 @@ layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: #ifdef LED_INDICATOR_4 - writePin(LED_INDICATOR_4, 1); + gpio_write_pin(LED_INDICATOR_4, 1); #endif #ifdef LED_INDICATOR_5 - writePin(LED_INDICATOR_5, 1); + gpio_write_pin(LED_INDICATOR_5, 1); #endif break; case 2: #ifdef LED_INDICATOR_1 - writePin(LED_INDICATOR_1, 1); + gpio_write_pin(LED_INDICATOR_1, 1); #endif #ifdef LED_INDICATOR_2 - writePin(LED_INDICATOR_2, 1); + gpio_write_pin(LED_INDICATOR_2, 1); #endif #ifdef LED_INDICATOR_3 - writePin(LED_INDICATOR_3, 1); + gpio_write_pin(LED_INDICATOR_3, 1); #endif break; default: #ifdef LED_INDICATOR_1 - writePin(LED_INDICATOR_1, 0); + gpio_write_pin(LED_INDICATOR_1, 0); #endif #ifdef LED_INDICATOR_2 - writePin(LED_INDICATOR_2, 0); + gpio_write_pin(LED_INDICATOR_2, 0); #endif #ifdef LED_INDICATOR_3 - writePin(LED_INDICATOR_3, 0); + gpio_write_pin(LED_INDICATOR_3, 0); #endif #ifdef LED_INDICATOR_4 - writePin(LED_INDICATOR_4, 0); + gpio_write_pin(LED_INDICATOR_4, 0); #endif #ifdef LED_INDICATOR_5 - writePin(LED_INDICATOR_5, 0); + gpio_write_pin(LED_INDICATOR_5, 0); #endif break; } diff --git a/keyboards/darkproject/kd83a_bfg_edition/kd83a_bfg_edition.c b/keyboards/darkproject/kd83a_bfg_edition/kd83a_bfg_edition.c index f21aeeb38d3..750e6d4d360 100644 --- a/keyboards/darkproject/kd83a_bfg_edition/kd83a_bfg_edition.c +++ b/keyboards/darkproject/kd83a_bfg_edition/kd83a_bfg_edition.c @@ -152,7 +152,7 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); }; void housekeeping_task_kb(void) { - writePin(C15, keymap_config.no_gui); + gpio_write_pin(C15, keymap_config.no_gui); }; bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/darkproject/kd87a_bfg_edition/kd87a_bfg_edition.c b/keyboards/darkproject/kd87a_bfg_edition/kd87a_bfg_edition.c index 20a46e343ea..2310aa713c8 100644 --- a/keyboards/darkproject/kd87a_bfg_edition/kd87a_bfg_edition.c +++ b/keyboards/darkproject/kd87a_bfg_edition/kd87a_bfg_edition.c @@ -153,7 +153,7 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); }; void housekeeping_task_kb(void) { - writePin(C15, keymap_config.no_gui); + gpio_write_pin(C15, keymap_config.no_gui); }; bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dm9records/lain/lain.c b/keyboards/dm9records/lain/lain.c index cb8354e5c2a..1f0814c53b0 100644 --- a/keyboards/dm9records/lain/lain.c +++ b/keyboards/dm9records/lain/lain.c @@ -12,7 +12,7 @@ void lain_eeconfig_update_kb(void) { eeconfig_update_kb(lain_config.raw); } void lain_set_led(uint8_t no, bool flag) { led_states[no] = flag; - writePin(leds[no], lain_config.led_enabled ? flag : false); + gpio_write_pin(leds[no], lain_config.led_enabled ? flag : false); } void lain_enable_leds(bool flag) { @@ -20,7 +20,7 @@ void lain_enable_leds(bool flag) { lain_eeconfig_update_kb(); for (int i = 0; i < LED_NUM; i++) { - writePin(leds[i], lain_config.led_enabled ? led_states[i] : false); + gpio_write_pin(leds[i], lain_config.led_enabled ? led_states[i] : false); } } diff --git a/keyboards/doppelganger/doppelganger.c b/keyboards/doppelganger/doppelganger.c index 7aa2e533609..8039b17e550 100644 --- a/keyboards/doppelganger/doppelganger.c +++ b/keyboards/doppelganger/doppelganger.c @@ -23,18 +23,18 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(C6, !led_state.caps_lock); + gpio_write_pin(C6, !led_state.caps_lock); } return res; } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePin(B0, !(state & (1UL << 1))); + gpio_write_pin(B0, !(state & (1UL << 1))); return state; } diff --git a/keyboards/drop/lib/mux.c b/keyboards/drop/lib/mux.c index 85a657544f6..a988f8ccb2c 100644 --- a/keyboards/drop/lib/mux.c +++ b/keyboards/drop/lib/mux.c @@ -23,7 +23,7 @@ static inline void digital_write(pin_t pin, uint8_t level) { setPinOutput(pin); - writePin(pin, level); + gpio_write_pin(pin, level); } uint16_t v_con_1 = 0; diff --git a/keyboards/duck/orion/v3/v3.c b/keyboards/duck/orion/v3/v3.c index 87e3cc0f370..c0ca9ddd06a 100644 --- a/keyboards/duck/orion/v3/v3.c +++ b/keyboards/duck/orion/v3/v3.c @@ -31,9 +31,9 @@ // of the Escape key. bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(B0, !led_state.caps_lock); - writePin(B4, !led_state.num_lock); - writePin(D7, !led_state.scroll_lock); + gpio_write_pin(B0, !led_state.caps_lock); + gpio_write_pin(B4, !led_state.num_lock); + gpio_write_pin(D7, !led_state.scroll_lock); } return true; } diff --git a/keyboards/dumbpad/v0x/v0x.c b/keyboards/dumbpad/v0x/v0x.c index e89b79fd6c8..6a5e0335c8d 100644 --- a/keyboards/dumbpad/v0x/v0x.c +++ b/keyboards/dumbpad/v0x/v0x.c @@ -35,8 +35,8 @@ bool shutdown_kb(bool jump_to_bootloader) { layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); return layer_state_set_user(state); } diff --git a/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c b/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c index e89b79fd6c8..6a5e0335c8d 100644 --- a/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c +++ b/keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c @@ -35,8 +35,8 @@ bool shutdown_kb(bool jump_to_bootloader) { layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); return layer_state_set_user(state); } diff --git a/keyboards/dumbpad/v0x_right/v0x_right.c b/keyboards/dumbpad/v0x_right/v0x_right.c index e89b79fd6c8..6a5e0335c8d 100644 --- a/keyboards/dumbpad/v0x_right/v0x_right.c +++ b/keyboards/dumbpad/v0x_right/v0x_right.c @@ -35,8 +35,8 @@ bool shutdown_kb(bool jump_to_bootloader) { layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); return layer_state_set_user(state); } diff --git a/keyboards/dumbpad/v1x/v1x.c b/keyboards/dumbpad/v1x/v1x.c index 3600d6574af..6316cc5338f 100644 --- a/keyboards/dumbpad/v1x/v1x.c +++ b/keyboards/dumbpad/v1x/v1x.c @@ -37,8 +37,8 @@ bool shutdown_kb(bool jump_to_bootloader) { layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); return layer_state_set_user(state); } @@ -69,7 +69,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED_02, !led_state.num_lock); + gpio_write_pin(LED_02, !led_state.num_lock); } return res; } diff --git a/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c b/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c index 3600d6574af..6316cc5338f 100644 --- a/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c +++ b/keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c @@ -37,8 +37,8 @@ bool shutdown_kb(bool jump_to_bootloader) { layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); return layer_state_set_user(state); } @@ -69,7 +69,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED_02, !led_state.num_lock); + gpio_write_pin(LED_02, !led_state.num_lock); } return res; } diff --git a/keyboards/dumbpad/v1x_right/v1x_right.c b/keyboards/dumbpad/v1x_right/v1x_right.c index 3600d6574af..6316cc5338f 100644 --- a/keyboards/dumbpad/v1x_right/v1x_right.c +++ b/keyboards/dumbpad/v1x_right/v1x_right.c @@ -37,8 +37,8 @@ bool shutdown_kb(bool jump_to_bootloader) { layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); return layer_state_set_user(state); } @@ -69,7 +69,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED_02, !led_state.num_lock); + gpio_write_pin(LED_02, !led_state.num_lock); } return res; } diff --git a/keyboards/dumbpad/v3x/v3x.c b/keyboards/dumbpad/v3x/v3x.c index 853fa742719..0de1608f002 100644 --- a/keyboards/dumbpad/v3x/v3x.c +++ b/keyboards/dumbpad/v3x/v3x.c @@ -68,8 +68,8 @@ bool shutdown_kb(bool jump_to_bootloader) { layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); uprintf("%d string", layer); return layer_state_set_user(state); } @@ -101,6 +101,6 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if (!led_update_user(led_state)) return false; // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - writePin(LED_02, !led_state.num_lock); + gpio_write_pin(LED_02, !led_state.num_lock); return true; } diff --git a/keyboards/dztech/bocc/bocc.c b/keyboards/dztech/bocc/bocc.c index fc2eb8d6eb3..c4d86ebcc87 100644 --- a/keyboards/dztech/bocc/bocc.c +++ b/keyboards/dztech/bocc/bocc.c @@ -23,7 +23,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(E6, !led_state.caps_lock); + gpio_write_pin(E6, !led_state.caps_lock); } return res; } diff --git a/keyboards/ealdin/quadrant/quadrant.c b/keyboards/ealdin/quadrant/quadrant.c index f98cafd7503..4d1aee78c14 100644 --- a/keyboards/ealdin/quadrant/quadrant.c +++ b/keyboards/ealdin/quadrant/quadrant.c @@ -61,7 +61,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(F0, led_state.caps_lock); + gpio_write_pin(F0, led_state.caps_lock); } return true; } diff --git a/keyboards/edda/edda.c b/keyboards/edda/edda.c index 38d1d5ddab7..f78eb4d0b9e 100644 --- a/keyboards/edda/edda.c +++ b/keyboards/edda/edda.c @@ -26,24 +26,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: - writePin(B2, 1); - writePin(B1, 0); - writePin(B0, 0); + gpio_write_pin(B2, 1); + gpio_write_pin(B1, 0); + gpio_write_pin(B0, 0); break; case 2: - writePin(B2, 1); - writePin(B1, 1); - writePin(B0, 0); + gpio_write_pin(B2, 1); + gpio_write_pin(B1, 1); + gpio_write_pin(B0, 0); break; case 3: - writePin(B2, 1); - writePin(B1, 1); - writePin(B0, 1); + gpio_write_pin(B2, 1); + gpio_write_pin(B1, 1); + gpio_write_pin(B0, 1); break; default: // for any other layers, or the default layer - writePin(B2, 0); - writePin(B1, 0); - writePin(B0, 0); + gpio_write_pin(B2, 0); + gpio_write_pin(B1, 0); + gpio_write_pin(B0, 0); break; } return state; diff --git a/keyboards/enviousdesign/commissions/mini1800/mini1800.c b/keyboards/enviousdesign/commissions/mini1800/mini1800.c index 51f9676bbfc..3a559af62c0 100644 --- a/keyboards/enviousdesign/commissions/mini1800/mini1800.c +++ b/keyboards/enviousdesign/commissions/mini1800/mini1800.c @@ -11,7 +11,7 @@ void matrix_init_user(void) { //layer, capslock and numlock layer_state_t layer_state_set_user(layer_state_t state) { - writePin(GP9, layer_state_cmp(state, 1)); + gpio_write_pin(GP9, layer_state_cmp(state, 1)); return state; } diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c index d1131f725ca..a048b0815a6 100644 --- a/keyboards/evyd13/gh80_3700/gh80_3700.c +++ b/keyboards/evyd13/gh80_3700/gh80_3700.c @@ -31,7 +31,7 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(E6, !led_state.num_lock); + gpio_write_pin(E6, !led_state.num_lock); } return true; diff --git a/keyboards/evyd13/pockettype/pockettype.c b/keyboards/evyd13/pockettype/pockettype.c index c0a542dcd3d..185353e9213 100644 --- a/keyboards/evyd13/pockettype/pockettype.c +++ b/keyboards/evyd13/pockettype/pockettype.c @@ -30,7 +30,7 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(F5, !led_state.caps_lock); + gpio_write_pin(F5, !led_state.caps_lock); } return true; diff --git a/keyboards/exclusive/e6v2/oe/oe.c b/keyboards/exclusive/e6v2/oe/oe.c index 6869a52c974..7139906002e 100644 --- a/keyboards/exclusive/e6v2/oe/oe.c +++ b/keyboards/exclusive/e6v2/oe/oe.c @@ -8,8 +8,8 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B2, !led_state.caps_lock); - writePin(B6, led_state.raw == 0); + gpio_write_pin(B2, !led_state.caps_lock); + gpio_write_pin(B6, led_state.raw == 0); } return res; } diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c index a6d50b1f773..23954d62411 100644 --- a/keyboards/exclusive/e85/hotswap/hotswap.c +++ b/keyboards/exclusive/e85/hotswap/hotswap.c @@ -25,8 +25,8 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(C7, led_state.caps_lock); - writePin(B5, led_state.scroll_lock); + gpio_write_pin(C7, led_state.caps_lock); + gpio_write_pin(B5, led_state.scroll_lock); } return true; } diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c index 81ae1f00ceb..73a34131c36 100644 --- a/keyboards/exclusive/e85/soldered/soldered.c +++ b/keyboards/exclusive/e85/soldered/soldered.c @@ -25,8 +25,8 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(C7, led_state.caps_lock); - writePin(B5, led_state.scroll_lock); + gpio_write_pin(C7, led_state.caps_lock); + gpio_write_pin(B5, led_state.scroll_lock); } return true; } diff --git a/keyboards/fjlabs/bolsa65/bolsa65.c b/keyboards/fjlabs/bolsa65/bolsa65.c index 1c65ca1a3df..ba1e8941ac3 100644 --- a/keyboards/fjlabs/bolsa65/bolsa65.c +++ b/keyboards/fjlabs/bolsa65/bolsa65.c @@ -22,7 +22,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(F7, led_state.caps_lock); + gpio_write_pin(F7, led_state.caps_lock); } return res; } diff --git a/keyboards/flx/virgo/virgo.c b/keyboards/flx/virgo/virgo.c index 5260e153223..cb288bbf3a8 100644 --- a/keyboards/flx/virgo/virgo.c +++ b/keyboards/flx/virgo/virgo.c @@ -27,8 +27,8 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(E6, !led_state.caps_lock); - writePin(B2, !led_state.scroll_lock); + gpio_write_pin(E6, !led_state.caps_lock); + gpio_write_pin(B2, !led_state.scroll_lock); } return true; } diff --git a/keyboards/geonworks/ee_at/ee_at.c b/keyboards/geonworks/ee_at/ee_at.c index b2e6320851b..58cd6809561 100644 --- a/keyboards/geonworks/ee_at/ee_at.c +++ b/keyboards/geonworks/ee_at/ee_at.c @@ -25,6 +25,6 @@ void led_init_ports(void) { } layer_state_t layer_state_set_kb(layer_state_t state) { - writePin(A14, !layer_state_cmp(state, 1)); + gpio_write_pin(A14, !layer_state_cmp(state, 1)); return layer_state_set_user(state); } diff --git a/keyboards/geonworks/w1_at/w1_at.c b/keyboards/geonworks/w1_at/w1_at.c index 9858561bc58..aa5cbadf6e5 100644 --- a/keyboards/geonworks/w1_at/w1_at.c +++ b/keyboards/geonworks/w1_at/w1_at.c @@ -25,6 +25,6 @@ void led_init_ports(void) { } layer_state_t layer_state_set_kb(layer_state_t state) { - writePin(A14, !layer_state_cmp(state, 1)); + gpio_write_pin(A14, !layer_state_cmp(state, 1)); return layer_state_set_user(state); } diff --git a/keyboards/ghs/rar/rar.c b/keyboards/ghs/rar/rar.c index 481a2a0c410..51ad08de5be 100644 --- a/keyboards/ghs/rar/rar.c +++ b/keyboards/ghs/rar/rar.c @@ -28,8 +28,8 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(B1, led_state.caps_lock); - writePin(B3, led_state.scroll_lock); + gpio_write_pin(B1, led_state.caps_lock); + gpio_write_pin(B3, led_state.scroll_lock); } return res; diff --git a/keyboards/gray_studio/think65/solder/solder.c b/keyboards/gray_studio/think65/solder/solder.c index f97a005218c..5245470813b 100644 --- a/keyboards/gray_studio/think65/solder/solder.c +++ b/keyboards/gray_studio/think65/solder/solder.c @@ -30,7 +30,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(C7, !led_state.caps_lock); + gpio_write_pin(C7, !led_state.caps_lock); } return true; } diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c index 736db8d4651..ede3fba82fb 100644 --- a/keyboards/handwired/colorlice/colorlice.c +++ b/keyboards/handwired/colorlice/colorlice.c @@ -55,14 +55,14 @@ void suspend_wakeup_init_kb(void) bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(B2, !led_state.num_lock); - writePin(C6, !led_state.caps_lock); - writePin(B7, !led_state.scroll_lock); + gpio_write_pin(B2, !led_state.num_lock); + gpio_write_pin(C6, !led_state.caps_lock); + gpio_write_pin(B7, !led_state.scroll_lock); } return res; } diff --git a/keyboards/handwired/evk/v1_3/v1_3.c b/keyboards/handwired/evk/v1_3/v1_3.c index 7c688939683..3cd34625c6c 100644 --- a/keyboards/handwired/evk/v1_3/v1_3.c +++ b/keyboards/handwired/evk/v1_3/v1_3.c @@ -30,15 +30,15 @@ void matrix_init_kb(void) { // Set LED based on layer __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D5, layer_state_cmp(state, 1)); + gpio_write_pin(D5, layer_state_cmp(state, 1)); return state; } bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - // writePin sets the pin high for 1 and low for 0. - writePin(D4, led_state.caps_lock); + // gpio_write_pin sets the pin high for 1 and low for 0. + gpio_write_pin(D4, led_state.caps_lock); } return res; } diff --git a/keyboards/handwired/jtallbean/split_65/split_65.c b/keyboards/handwired/jtallbean/split_65/split_65.c index 38fe74b7cca..8541957fbd9 100644 --- a/keyboards/handwired/jtallbean/split_65/split_65.c +++ b/keyboards/handwired/jtallbean/split_65/split_65.c @@ -36,8 +36,8 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. - writePin(B0, led_state.caps_lock); + // gpio_write_pin sets the pin high for 1 and low for 0. + gpio_write_pin(B0, led_state.caps_lock); } return res; } diff --git a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c index 2b1f3fb054d..0ebe716f047 100644 --- a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c +++ b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c @@ -30,9 +30,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B1, led_state.num_lock); - writePin(B0, led_state.caps_lock); - //writePin(B2, led_state.scroll_lock); + gpio_write_pin(B1, led_state.num_lock); + gpio_write_pin(B0, led_state.caps_lock); + //gpio_write_pin(B2, led_state.scroll_lock); } return res; } diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c index b7e1ec03fa2..371865a99aa 100644 --- a/keyboards/handwired/retro_refit/retro_refit.c +++ b/keyboards/handwired/retro_refit/retro_refit.c @@ -15,9 +15,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D0, !led_state.caps_lock); - writePin(D1, !led_state.num_lock); - writePin(C6, !led_state.scroll_lock); + gpio_write_pin(D0, !led_state.caps_lock); + gpio_write_pin(D1, !led_state.num_lock); + gpio_write_pin(C6, !led_state.scroll_lock); } return res; diff --git a/keyboards/handwired/selene/selene.c b/keyboards/handwired/selene/selene.c index a3702ce02e3..da5e5c6df73 100644 --- a/keyboards/handwired/selene/selene.c +++ b/keyboards/handwired/selene/selene.c @@ -30,9 +30,9 @@ void keyboard_post_init_user(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(NUM_LOCK_PIN, led_state.num_lock); - writePin(CAPS_LOCK_PIN, led_state.caps_lock); - writePin(SCROLL_LOCK_PIN, led_state.scroll_lock); + gpio_write_pin(NUM_LOCK_PIN, led_state.num_lock); + gpio_write_pin(CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(SCROLL_LOCK_PIN, led_state.scroll_lock); } return res; } diff --git a/keyboards/handwired/sono1/sono1.c b/keyboards/handwired/sono1/sono1.c index 96915327299..c8a4ebd0e5e 100644 --- a/keyboards/handwired/sono1/sono1.c +++ b/keyboards/handwired/sono1/sono1.c @@ -36,9 +36,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED_NUM_LOCK_PIN, !led_state.num_lock); - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); - writePin(LED_CTRL_XFER_PIN, !led_state.scroll_lock); + gpio_write_pin(LED_NUM_LOCK_PIN, !led_state.num_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CTRL_XFER_PIN, !led_state.scroll_lock); } return res; } diff --git a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c index adc3df49d8b..017070e99bd 100644 --- a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c +++ b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c @@ -142,7 +142,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; col_index++) { // Select the col pin to read (active low) # ifdef MATRIX_MUL_SELECT - writePin(MATRIX_MUL_SELECT, col_sel[col_index]); + gpio_write_pin(MATRIX_MUL_SELECT, col_sel[col_index]); waitInputPinDelay(); # endif uint8_t pin_state = gpio_read_pin(col_pins[col_index]); @@ -161,7 +161,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) is_pressed = false; for (uint8_t i = 0; i < ARRAY_SIZE(delay_ports); i++) { # ifdef MATRIX_IO_DELAY_MULSEL - writePin(MATRIX_MUL_SELECT, delay_sel[i]); + gpio_write_pin(MATRIX_MUL_SELECT, delay_sel[i]); waitInputPinDelay(); # endif is_pressed |= ((readPort(delay_ports[i]) & delay_masks[i]) != delay_masks[i]); @@ -175,7 +175,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; col_index++) { MATRIX_DEBUG_DELAY_START(); # ifdef MATRIX_MUL_SELECT - writePin(MATRIX_MUL_SELECT, col_sel[col_index]); + gpio_write_pin(MATRIX_MUL_SELECT, col_sel[col_index]); waitInputPinDelay(); # endif while (gpio_read_pin(col_pins[col_index]) == 0) { @@ -194,7 +194,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) MATRIX_DEBUG_DELAY_END(); MATRIX_DEBUG_DELAY_START(); # ifdef MATRIX_MUL_SELECT - writePin(MATRIX_MUL_SELECT, col_sel[col_index]); + gpio_write_pin(MATRIX_MUL_SELECT, col_sel[col_index]); waitInputPinDelay(); # endif state |= (gpio_read_pin(col_pins[col_index]) == 0); diff --git a/keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extension_74hc15x.c b/keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extension_74hc15x.c index a4cf5702648..63a9e471187 100644 --- a/keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extension_74hc15x.c +++ b/keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extension_74hc15x.c @@ -47,9 +47,9 @@ static const pin_t sel_pins[] = { MATRIX_EXT_74HC15x }; LOCAL_FUNC ALWAYS_INLINE void select74HC15x(uint8_t devid); LOCAL_FUNC void select74HC15x(uint8_t devid) { - writePin(sel_pins[0], devid&1); + gpio_write_pin(sel_pins[0], devid&1); #if defined(MATRIX_EXTENSION_74HC153) - writePin(sel_pins[1], devid&2); + gpio_write_pin(sel_pins[1], devid&2); #endif } diff --git a/keyboards/handwired/z150/z150.c b/keyboards/handwired/z150/z150.c index 373364bd5b7..0c5f464fce0 100644 --- a/keyboards/handwired/z150/z150.c +++ b/keyboards/handwired/z150/z150.c @@ -31,9 +31,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - 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 res; } diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c index 1005c5cd63b..74fb3e1a10d 100644 --- a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c +++ b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c @@ -30,9 +30,9 @@ void keyboard_pre_init_kb(void) bool led_update_kb(led_t led_state) { if (led_update_user(led_state)){ - writePin(D7, !led_state.num_lock); - writePin(D6, !led_state.caps_lock); - writePin(D4, !led_state.scroll_lock); + gpio_write_pin(D7, !led_state.num_lock); + gpio_write_pin(D6, !led_state.caps_lock); + gpio_write_pin(D4, !led_state.scroll_lock); } return true; diff --git a/keyboards/hhkb/yang/yang.c b/keyboards/hhkb/yang/yang.c index 2adf9c79c02..344153746c9 100644 --- a/keyboards/hhkb/yang/yang.c +++ b/keyboards/hhkb/yang/yang.c @@ -111,8 +111,8 @@ void suspend_wakeup_init_kb(void) { layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); - writePin(F1, IS_LAYER_ON_STATE(state, 1)); - writePin(F0, IS_LAYER_ON_STATE(state, 2)); + gpio_write_pin(F1, IS_LAYER_ON_STATE(state, 1)); + gpio_write_pin(F0, IS_LAYER_ON_STATE(state, 2)); return state; } diff --git a/keyboards/hineybush/h10/h10.c b/keyboards/hineybush/h10/h10.c index 81f5bdfbf25..adb64728a3f 100644 --- a/keyboards/hineybush/h10/h10.c +++ b/keyboards/hineybush/h10/h10.c @@ -28,7 +28,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(F7, !led_state.num_lock); + gpio_write_pin(F7, !led_state.num_lock); } return true; } diff --git a/keyboards/hineybush/h60/h60.c b/keyboards/hineybush/h60/h60.c index 4373157996a..69d602fbad1 100644 --- a/keyboards/hineybush/h60/h60.c +++ b/keyboards/hineybush/h60/h60.c @@ -24,7 +24,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(C6, !led_state.caps_lock); + gpio_write_pin(C6, !led_state.caps_lock); } return true; } diff --git a/keyboards/hineybush/h87a/h87a.c b/keyboards/hineybush/h87a/h87a.c index bf4213a2001..8648019f32f 100644 --- a/keyboards/hineybush/h87a/h87a.c +++ b/keyboards/hineybush/h87a/h87a.c @@ -25,8 +25,8 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(D5, !led_state.caps_lock); - writePin(E6, !led_state.scroll_lock); + gpio_write_pin(D5, !led_state.caps_lock); + gpio_write_pin(E6, !led_state.scroll_lock); } return true; } diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c index 9abeccd1d5c..3f72016bf38 100644 --- a/keyboards/hineybush/h88/h88.c +++ b/keyboards/hineybush/h88/h88.c @@ -25,8 +25,8 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(D5, !led_state.caps_lock); - writePin(E6, !led_state.scroll_lock); + gpio_write_pin(D5, !led_state.caps_lock); + gpio_write_pin(E6, !led_state.scroll_lock); } return true; } diff --git a/keyboards/hineybush/physix/physix.c b/keyboards/hineybush/physix/physix.c index c118b30d2e0..41ce2c5f833 100644 --- a/keyboards/hineybush/physix/physix.c +++ b/keyboards/hineybush/physix/physix.c @@ -33,13 +33,13 @@ bool led_update_kb(led_t led_state) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(D3, led_state.caps_lock); - writePin(D5, led_state.scroll_lock); + gpio_write_pin(D3, led_state.caps_lock); + gpio_write_pin(D5, led_state.scroll_lock); } return res; return led_update_user(led_state); diff --git a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c index 273ede6b600..ac73eb0e0aa 100644 --- a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c +++ b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c @@ -28,9 +28,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(D5, !led_state.num_lock); - writePin(D6, !led_state.caps_lock); - writePin(D7, !led_state.scroll_lock); + gpio_write_pin(D5, !led_state.num_lock); + gpio_write_pin(D6, !led_state.caps_lock); + gpio_write_pin(D7, !led_state.scroll_lock); } return true; } diff --git a/keyboards/ibm/model_m/modelh/modelh.c b/keyboards/ibm/model_m/modelh/modelh.c index 5384b373385..d6c725bf865 100644 --- a/keyboards/ibm/model_m/modelh/modelh.c +++ b/keyboards/ibm/model_m/modelh/modelh.c @@ -19,7 +19,7 @@ void keyboard_pre_init_kb(void) { setPinOutput(MODELH_STATUS_LED); - writePin(MODELH_STATUS_LED, 0); + gpio_write_pin(MODELH_STATUS_LED, 0); keyboard_pre_init_user(); } diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c index 236dbe2c515..144e86d3cfa 100644 --- a/keyboards/ibm/model_m/mschwingen/mschwingen.c +++ b/keyboards/ibm/model_m/mschwingen/mschwingen.c @@ -187,9 +187,9 @@ bool led_update_kb(led_t led_state) { dprintf("LED Update: %d %d %d", led_state.num_lock, led_state.caps_lock, led_state.scroll_lock); if (led_update_user(led_state)) { - if (!isRecording) writePin(MODELM_LED_NUMLOCK, !led_state.num_lock); - writePin(MODELM_LED_CAPSLOCK, !led_state.caps_lock); - writePin(MODELM_LED_SCROLLOCK, !led_state.scroll_lock); + if (!isRecording) gpio_write_pin(MODELM_LED_NUMLOCK, !led_state.num_lock); + gpio_write_pin(MODELM_LED_CAPSLOCK, !led_state.caps_lock); + gpio_write_pin(MODELM_LED_SCROLLOCK, !led_state.scroll_lock); } return true; } @@ -198,7 +198,7 @@ void update_layer_leds(void) { if (isRecording && timer_elapsed(blink_cycle_timer) > 150) { blink_state = !blink_state; blink_cycle_timer = timer_read(); - writePin(MODELM_LED_NUMLOCK, blink_state); + gpio_write_pin(MODELM_LED_NUMLOCK, blink_state); } } diff --git a/keyboards/ibm/model_m/teensypp/teensypp.c b/keyboards/ibm/model_m/teensypp/teensypp.c index fc5b8e4df8d..0ad82121336 100644 --- a/keyboards/ibm/model_m/teensypp/teensypp.c +++ b/keyboards/ibm/model_m/teensypp/teensypp.c @@ -28,9 +28,9 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B4, !led_state.num_lock); - writePin(B6, !led_state.caps_lock); - writePin(B5, !led_state.scroll_lock); + gpio_write_pin(B4, !led_state.num_lock); + gpio_write_pin(B6, !led_state.caps_lock); + gpio_write_pin(B5, !led_state.scroll_lock); } return res; } diff --git a/keyboards/ibm/model_m/yugo_m/yugo_m.c b/keyboards/ibm/model_m/yugo_m/yugo_m.c index 542043d5dc6..6d44102574a 100644 --- a/keyboards/ibm/model_m/yugo_m/yugo_m.c +++ b/keyboards/ibm/model_m/yugo_m/yugo_m.c @@ -27,9 +27,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(A2, !led_state.num_lock); - writePin(A1, !led_state.caps_lock); - writePin(A0, !led_state.scroll_lock); + gpio_write_pin(A2, !led_state.num_lock); + gpio_write_pin(A1, !led_state.caps_lock); + gpio_write_pin(A0, !led_state.scroll_lock); } return res; } diff --git a/keyboards/ilumkb/volcano660/volcano660.c b/keyboards/ilumkb/volcano660/volcano660.c index d6c004987e5..67754be45ec 100644 --- a/keyboards/ilumkb/volcano660/volcano660.c +++ b/keyboards/ilumkb/volcano660/volcano660.c @@ -25,9 +25,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D0, !led_state.num_lock); - writePin(D2, !led_state.caps_lock); - writePin(D1, !led_state.scroll_lock); + gpio_write_pin(D0, !led_state.num_lock); + gpio_write_pin(D2, !led_state.caps_lock); + gpio_write_pin(D1, !led_state.scroll_lock); } return res; diff --git a/keyboards/jae/j01/j01.c b/keyboards/jae/j01/j01.c index 95f3e9b042b..187207eb957 100644 --- a/keyboards/jae/j01/j01.c +++ b/keyboards/jae/j01/j01.c @@ -31,7 +31,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(E6, !led_state.caps_lock); + gpio_write_pin(E6, !led_state.caps_lock); } return true; diff --git a/keyboards/jels/jels88/jels88.c b/keyboards/jels/jels88/jels88.c index 8e9c12aced3..eaaa11741a6 100644 --- a/keyboards/jels/jels88/jels88.c +++ b/keyboards/jels/jels88/jels88.c @@ -31,8 +31,8 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(CAPS_LED, led_state.caps_lock); - writePin(SCROLL_LED, led_state.scroll_lock); + gpio_write_pin(CAPS_LED, led_state.caps_lock); + gpio_write_pin(SCROLL_LED, led_state.scroll_lock); } return res; } diff --git a/keyboards/jian/nsrev2/config.h b/keyboards/jian/nsrev2/config.h index 4ef98a53ed6..48d76bd8a3a 100644 --- a/keyboards/jian/nsrev2/config.h +++ b/keyboards/jian/nsrev2/config.h @@ -59,31 +59,31 @@ along with this program. If not, see . #ifdef NUM_NMOSFET #define RESET_NUM_LOCK_LED() gpio_write_pin_low(NUM_LOCK_LED_PIN) #ifdef NUM_INVERT -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock) #else -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock) #endif // NUM_INVERT #else #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) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock) #else -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock) #endif // NUM_INVERT #endif // NUM_NMOSFET #ifdef CAPS_NMOSFET #define RESET_CAPS_LOCK_LED() gpio_write_pin_low(CAPS_LOCK_LED_PIN) -#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) +#define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, led_state.caps_lock) #else #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) +#define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) #endif // CAPS_NMOSFET #ifdef SCROLL_NMOSFET #define RESET_SCROLL_LOCK_LED() gpio_write_pin_low(SCROLL_LOCK_LED_PIN) -#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) +#define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) #else #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) +#define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(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 9fd8c188b4a..7ee2effd511 100644 --- a/keyboards/jian/rev1/config.h +++ b/keyboards/jian/rev1/config.h @@ -41,33 +41,33 @@ along with this program. If not, see . #ifdef NUM_NMOSFET #define RESET_NUM_LOCK_LED() gpio_write_pin_low(NUM_LOCK_LED_PIN) #ifdef NUM_INVERT -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock) #else -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock) #endif // NUM_INVERT #else #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) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock) #else -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock) #endif // NUM_INVERT #endif // NUM_NMOSFET #ifdef CAPS_NMOSFET #define RESET_CAPS_LOCK_LED() gpio_write_pin_low(CAPS_LOCK_LED_PIN) -#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) +#define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, led_state.caps_lock) #else #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) +#define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) #endif // CAPS_NMOSFET #ifdef SCROLL_NMOSFET #define RESET_SCROLL_LOCK_LED() gpio_write_pin_low(SCROLL_LOCK_LED_PIN) -#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) +#define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) #else #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) +#define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) #endif // SCROLL_NMOSFET #define RGBLIGHT_TIMER diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h index 793aeef7cc6..33ba0ecbc50 100644 --- a/keyboards/jian/rev2/config.h +++ b/keyboards/jian/rev2/config.h @@ -47,31 +47,31 @@ along with this program. If not, see . #ifdef NUM_NMOSFET #define RESET_NUM_LOCK_LED() gpio_write_pin_low(NUM_LOCK_LED_PIN) #ifdef NUM_INVERT -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock) #else -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock) #endif // NUM_INVERT #else #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) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, led_state.num_lock) #else -#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#define UPDATE_NUM_LOCK_LED() gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock) #endif // NUM_INVERT #endif // NUM_NMOSFET #ifdef CAPS_NMOSFET #define RESET_CAPS_LOCK_LED() gpio_write_pin_low(CAPS_LOCK_LED_PIN) -#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) +#define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, led_state.caps_lock) #else #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) +#define UPDATE_CAPS_LOCK_LED() gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) #endif // CAPS_NMOSFET #ifdef SCROLL_NMOSFET #define RESET_SCROLL_LOCK_LED() gpio_write_pin_low(SCROLL_LOCK_LED_PIN) -#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) +#define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) #else #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) +#define UPDATE_SCROLL_LOCK_LED() gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) #endif // SCROLL_NMOSFET diff --git a/keyboards/jukaie/jk01/jk01.c b/keyboards/jukaie/jk01/jk01.c index 913e77a55e7..9e6d05184f5 100644 --- a/keyboards/jukaie/jk01/jk01.c +++ b/keyboards/jukaie/jk01/jk01.c @@ -152,7 +152,7 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); }; void housekeeping_task_kb(void) { - writePin(C15, keymap_config.no_gui); + gpio_write_pin(C15, keymap_config.no_gui); }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/kabedon/kabedon980/kabedon980.c b/keyboards/kabedon/kabedon980/kabedon980.c index 0614972f5e0..7024a2eaa99 100644 --- a/keyboards/kabedon/kabedon980/kabedon980.c +++ b/keyboards/kabedon/kabedon980/kabedon980.c @@ -2,7 +2,7 @@ bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(E6, !led_state.caps_lock); + gpio_write_pin(E6, !led_state.caps_lock); } return true; } diff --git a/keyboards/kbdfans/bella/soldered/soldered.c b/keyboards/kbdfans/bella/soldered/soldered.c index 65809c3c2f0..f21c0216f17 100755 --- a/keyboards/kbdfans/bella/soldered/soldered.c +++ b/keyboards/kbdfans/bella/soldered/soldered.c @@ -22,7 +22,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(E6, !led_state.caps_lock); + gpio_write_pin(E6, !led_state.caps_lock); } return res; } diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.c b/keyboards/kbdfans/maja_soldered/maja_soldered.c index c7740277806..045cc18837d 100755 --- a/keyboards/kbdfans/maja_soldered/maja_soldered.c +++ b/keyboards/kbdfans/maja_soldered/maja_soldered.c @@ -23,7 +23,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D4, !led_state.caps_lock); + gpio_write_pin(D4, !led_state.caps_lock); } return res; } diff --git a/keyboards/kbdmania/kmac/matrix.c b/keyboards/kbdmania/kmac/matrix.c index da963bfb233..075240cba0f 100644 --- a/keyboards/kbdmania/kmac/matrix.c +++ b/keyboards/kbdmania/kmac/matrix.c @@ -106,11 +106,11 @@ static void select_col(uint8_t col) { if (col < 16) { uint8_t c = col + 8; - writePin(B6, c & 0b10000); - writePin(C6, c & 0b01000); - writePin(C7, c & 0b00100); - writePin(F1, c & 0b00010); - writePin(F0, c & 0b00001); + gpio_write_pin(B6, c & 0b10000); + gpio_write_pin(C6, c & 0b01000); + gpio_write_pin(C7, c & 0b00100); + gpio_write_pin(F1, c & 0b00010); + gpio_write_pin(F0, c & 0b00001); } else { gpio_write_pin_high(B5); } diff --git a/keyboards/kc60se/kc60se.c b/keyboards/kc60se/kc60se.c index 660b9201b37..519f18705bd 100644 --- a/keyboards/kc60se/kc60se.c +++ b/keyboards/kc60se/kc60se.c @@ -23,7 +23,7 @@ void matrix_init_kb(void){ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B2, !led_state.caps_lock); + gpio_write_pin(B2, !led_state.caps_lock); } return res; } diff --git a/keyboards/keebio/kbo5000/rev1/rev1.c b/keyboards/keebio/kbo5000/rev1/rev1.c index 45443becbe6..14cf32952f1 100644 --- a/keyboards/keebio/kbo5000/rev1/rev1.c +++ b/keyboards/keebio/kbo5000/rev1/rev1.c @@ -9,7 +9,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { // Only update if left half if (isLeftHand && led_update_user(led_state)) { - writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); } return true; } diff --git a/keyboards/keebio/quefrency/rev2/rev2.c b/keyboards/keebio/quefrency/rev2/rev2.c index a3bc2ca1ef5..e278d890b0b 100644 --- a/keyboards/keebio/quefrency/rev2/rev2.c +++ b/keyboards/keebio/quefrency/rev2/rev2.c @@ -9,7 +9,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { // Only update if left half if (isLeftHand && led_update_user(led_state)) { - writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); } return true; } diff --git a/keyboards/keebio/quefrency/rev3/rev3.c b/keyboards/keebio/quefrency/rev3/rev3.c index d3ada3076ff..519ff067bdb 100644 --- a/keyboards/keebio/quefrency/rev3/rev3.c +++ b/keyboards/keebio/quefrency/rev3/rev3.c @@ -25,7 +25,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { // Only update if left half if (led_update_user(led_state) && isLeftHand) { - writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); } return true; } diff --git a/keyboards/keebio/sinc/sinc.c b/keyboards/keebio/sinc/sinc.c index d50eb820191..c1ebd1a206b 100644 --- a/keyboards/keebio/sinc/sinc.c +++ b/keyboards/keebio/sinc/sinc.c @@ -22,7 +22,7 @@ bool led_update_kb(led_t led_state) { if (!led_update_user(led_state)) { return false; } // Only update if left half if (isLeftHand && led_update_user(led_state)) { - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); } return true; } diff --git a/keyboards/keyhive/lattice60/lattice60.c b/keyboards/keyhive/lattice60/lattice60.c index 7a5450a6783..fb2320bbb7a 100644 --- a/keyboards/keyhive/lattice60/lattice60.c +++ b/keyboards/keyhive/lattice60/lattice60.c @@ -31,7 +31,7 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res){ //write the CAPS LOCK state on LED1 - writePin(LED1_PIN, led_state.caps_lock); + gpio_write_pin(LED1_PIN, led_state.caps_lock); } return res; } diff --git a/keyboards/kkatano/wallaby/wallaby.c b/keyboards/kkatano/wallaby/wallaby.c index 4d619bec8e2..de2583903bb 100644 --- a/keyboards/kkatano/wallaby/wallaby.c +++ b/keyboards/kkatano/wallaby/wallaby.c @@ -18,8 +18,8 @@ bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(B6, led_state.caps_lock); - writePin(B7, led_state.scroll_lock); + gpio_write_pin(B6, led_state.caps_lock); + gpio_write_pin(B7, led_state.scroll_lock); } return true; } diff --git a/keyboards/kkatano/yurei/yurei.c b/keyboards/kkatano/yurei/yurei.c index 457a6ce48c0..283726a884f 100644 --- a/keyboards/kkatano/yurei/yurei.c +++ b/keyboards/kkatano/yurei/yurei.c @@ -18,8 +18,8 @@ bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(B6, led_state.caps_lock); - writePin(B7, led_state.scroll_lock); + gpio_write_pin(B6, led_state.caps_lock); + gpio_write_pin(B7, led_state.scroll_lock); } return true; } diff --git a/keyboards/kopibeng/mnk88/mnk88.c b/keyboards/kopibeng/mnk88/mnk88.c index cb53d315794..afed608047e 100644 --- a/keyboards/kopibeng/mnk88/mnk88.c +++ b/keyboards/kopibeng/mnk88/mnk88.c @@ -29,8 +29,8 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); - writePin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); } return res; } diff --git a/keyboards/kopibeng/xt8x/xt8x.c b/keyboards/kopibeng/xt8x/xt8x.c index 870a075e5b3..66dbcb70ae8 100644 --- a/keyboards/kopibeng/xt8x/xt8x.c +++ b/keyboards/kopibeng/xt8x/xt8x.c @@ -31,13 +31,13 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); - writePin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); } return res; } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePin(INDICATOR_PIN_0, layer_state_cmp(state, 1)); + gpio_write_pin(INDICATOR_PIN_0, layer_state_cmp(state, 1)); return state; } diff --git a/keyboards/ktec/ergodone/ergodox_compat.h b/keyboards/ktec/ergodone/ergodox_compat.h index de6ee4a211d..8ff9c209f6c 100644 --- a/keyboards/ktec/ergodone/ergodox_compat.h +++ b/keyboards/ktec/ergodone/ergodox_compat.h @@ -15,12 +15,12 @@ #endif #define LED_BRIGHTNESS_LO 15 #define LED_BRIGHTNESS_HI 255 -static inline void ergodox_right_led_1_off(void) { setPinOutput(LED_NUM_LOCK_PIN); writePin(LED_NUM_LOCK_PIN, 0); } -static inline void ergodox_right_led_1_on(void) { setPinOutput(LED_NUM_LOCK_PIN); writePin(LED_NUM_LOCK_PIN, 1); } -static inline void ergodox_right_led_2_off(void) { setPinOutput(LED_CAPS_LOCK_PIN); writePin(LED_CAPS_LOCK_PIN, 0); } -static inline void ergodox_right_led_2_on(void) { setPinOutput(LED_CAPS_LOCK_PIN); writePin(LED_CAPS_LOCK_PIN, 1); } -static inline void ergodox_right_led_3_off(void) { setPinOutput(LED_SCROLL_LOCK_PIN); writePin(LED_SCROLL_LOCK_PIN, 0); } -static inline void ergodox_right_led_3_on(void) { setPinOutput(LED_SCROLL_LOCK_PIN); writePin(LED_SCROLL_LOCK_PIN, 1); } +static inline void ergodox_right_led_1_off(void) { setPinOutput(LED_NUM_LOCK_PIN); gpio_write_pin(LED_NUM_LOCK_PIN, 0); } +static inline void ergodox_right_led_1_on(void) { setPinOutput(LED_NUM_LOCK_PIN); gpio_write_pin(LED_NUM_LOCK_PIN, 1); } +static inline void ergodox_right_led_2_off(void) { setPinOutput(LED_CAPS_LOCK_PIN); gpio_write_pin(LED_CAPS_LOCK_PIN, 0); } +static inline void ergodox_right_led_2_on(void) { setPinOutput(LED_CAPS_LOCK_PIN); gpio_write_pin(LED_CAPS_LOCK_PIN, 1); } +static inline void ergodox_right_led_3_off(void) { setPinOutput(LED_SCROLL_LOCK_PIN); gpio_write_pin(LED_SCROLL_LOCK_PIN, 0); } +static inline void ergodox_right_led_3_on(void) { setPinOutput(LED_SCROLL_LOCK_PIN); gpio_write_pin(LED_SCROLL_LOCK_PIN, 1); } static inline void ergodox_right_led_on(uint8_t l) { switch (l) { case 1: @@ -51,8 +51,8 @@ static inline void ergodox_right_led_off(uint8_t l) { break; } } -static inline void ergodox_board_led_off(void) { setPinOutput(D5); writePin(D5, !ERGODOX_BOARD_LED_ON_STATE); } -static inline void ergodox_board_led_on(void) { setPinOutput(D5); writePin(D5, ERGODOX_BOARD_LED_ON_STATE); } +static inline void ergodox_board_led_off(void) { setPinOutput(D5); gpio_write_pin(D5, !ERGODOX_BOARD_LED_ON_STATE); } +static inline void ergodox_board_led_on(void) { setPinOutput(D5); gpio_write_pin(D5, ERGODOX_BOARD_LED_ON_STATE); } static inline void ergodox_led_all_on(void) { ergodox_right_led_1_on(); ergodox_right_led_2_on(); diff --git a/keyboards/marksard/leftover30/leftover30.c b/keyboards/marksard/leftover30/leftover30.c index 6d8b64cd906..f65ffdd39a4 100644 --- a/keyboards/marksard/leftover30/leftover30.c +++ b/keyboards/marksard/leftover30/leftover30.c @@ -30,8 +30,8 @@ void keyboard_pre_init_user(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D2, led_state.num_lock); - writePin(D1, led_state.caps_lock); + gpio_write_pin(D2, led_state.num_lock); + gpio_write_pin(D1, led_state.caps_lock); } return res; } diff --git a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c index 3a3446d7ae9..4ed99c6f0fb 100644 --- a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c +++ b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c @@ -35,8 +35,8 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(CAPS_PIN, led_state.caps_lock); - writePin(SCROLL_PIN, led_state.scroll_lock); + gpio_write_pin(CAPS_PIN, led_state.caps_lock); + gpio_write_pin(SCROLL_PIN, led_state.scroll_lock); } return res; } diff --git a/keyboards/matrix/cain_re/cain_re.c b/keyboards/matrix/cain_re/cain_re.c index 5151f021bac..cab6bbffc93 100644 --- a/keyboards/matrix/cain_re/cain_re.c +++ b/keyboards/matrix/cain_re/cain_re.c @@ -32,9 +32,9 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(NUM_PIN, led_state.num_lock); - writePin(CAPS_PIN, led_state.caps_lock); - writePin(SCROLL_PIN, led_state.scroll_lock); + gpio_write_pin(NUM_PIN, led_state.num_lock); + gpio_write_pin(CAPS_PIN, led_state.caps_lock); + gpio_write_pin(SCROLL_PIN, led_state.scroll_lock); } return res; } diff --git a/keyboards/matrix/m12og/rev2/rev2.c b/keyboards/matrix/m12og/rev2/rev2.c index 1a35dff7a90..52689b1124f 100644 --- a/keyboards/matrix/m12og/rev2/rev2.c +++ b/keyboards/matrix/m12og/rev2/rev2.c @@ -13,9 +13,9 @@ void matrix_init_user(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(B1, !led_state.num_lock); - writePin(C6, !led_state.caps_lock); - writePin(B2, !led_state.scroll_lock); + gpio_write_pin(B1, !led_state.num_lock); + gpio_write_pin(C6, !led_state.caps_lock); + gpio_write_pin(B2, !led_state.scroll_lock); } return res; } diff --git a/keyboards/mc_76k/mc_76k.c b/keyboards/mc_76k/mc_76k.c index 51e9d554064..df00c38901a 100644 --- a/keyboards/mc_76k/mc_76k.c +++ b/keyboards/mc_76k/mc_76k.c @@ -23,12 +23,12 @@ void keyboard_pre_init_kb (void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(D2, !led_state.caps_lock); + gpio_write_pin(D2, !led_state.caps_lock); } return res; } diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 0f31a9349f2..21b415709fe 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -26,7 +26,7 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B2, led_state.caps_lock); + gpio_write_pin(B2, led_state.caps_lock); } return res; } diff --git a/keyboards/mechlovin/infinityce/infinityce.c b/keyboards/mechlovin/infinityce/infinityce.c index 36f533fc2ac..b7bb8bbd799 100644 --- a/keyboards/mechlovin/infinityce/infinityce.c +++ b/keyboards/mechlovin/infinityce/infinityce.c @@ -23,7 +23,7 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B3, led_state.caps_lock); + gpio_write_pin(B3, led_state.caps_lock); rgblight_set_effect_range(1, 30); if (led_state.scroll_lock) { rgblight_setrgb_at(255, 255, 255, 0); diff --git a/keyboards/mechlovin/kanu/kanu.c b/keyboards/mechlovin/kanu/kanu.c index 67bf8f88fb7..9dada7dfbce 100644 --- a/keyboards/mechlovin/kanu/kanu.c +++ b/keyboards/mechlovin/kanu/kanu.c @@ -25,7 +25,7 @@ void led_init_ports(void) { } bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(B2, led_state.caps_lock); + gpio_write_pin(B2, led_state.caps_lock); } return true; @@ -34,10 +34,10 @@ bool led_update_kb(led_t led_state) { __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { // if on layer 1, turn on D2 LED, otherwise off. - writePin(D2, get_highest_layer(state) == 1); + gpio_write_pin(D2, get_highest_layer(state) == 1); // if on layer 2, turn on D1 LED, otherwise off. - writePin(D1, get_highest_layer(state) == 2); + gpio_write_pin(D1, get_highest_layer(state) == 2); // if on layer 3, turn on D0 LED, otherwise off. - writePin(D0, get_highest_layer(state) == 3); + gpio_write_pin(D0, get_highest_layer(state) == 3); return state; } diff --git a/keyboards/mechlovin/olly/bb/bb.c b/keyboards/mechlovin/olly/bb/bb.c index dac77ff6236..900737bfe7a 100644 --- a/keyboards/mechlovin/olly/bb/bb.c +++ b/keyboards/mechlovin/olly/bb/bb.c @@ -25,11 +25,11 @@ void led_init_ports(void) { } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D1, layer_state_cmp(state, 1)); - writePin(D0, layer_state_cmp(state, 2)); - writePin(C1, layer_state_cmp(state, 3)); - writePin(C0, layer_state_cmp(state, 4)); - writePin(C6, layer_state_cmp(state, 5)); + gpio_write_pin(D1, layer_state_cmp(state, 1)); + gpio_write_pin(D0, layer_state_cmp(state, 2)); + gpio_write_pin(C1, layer_state_cmp(state, 3)); + gpio_write_pin(C0, layer_state_cmp(state, 4)); + gpio_write_pin(C6, layer_state_cmp(state, 5)); return state; } diff --git a/keyboards/mechlovin/olly/jf/rev1/rev1.c b/keyboards/mechlovin/olly/jf/rev1/rev1.c index 3d18d7bb5ab..9699373ccda 100644 --- a/keyboards/mechlovin/olly/jf/rev1/rev1.c +++ b/keyboards/mechlovin/olly/jf/rev1/rev1.c @@ -29,11 +29,11 @@ void led_init_ports(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - writePin(D1, layer_state_cmp(state, 1)); - writePin(D0, layer_state_cmp(state, 2)); - writePin(C1, layer_state_cmp(state, 3)); - writePin(C0, layer_state_cmp(state, 4)); - writePin(C6, layer_state_cmp(state, 5)); + gpio_write_pin(D1, layer_state_cmp(state, 1)); + gpio_write_pin(D0, layer_state_cmp(state, 2)); + gpio_write_pin(C1, layer_state_cmp(state, 3)); + gpio_write_pin(C0, layer_state_cmp(state, 4)); + gpio_write_pin(C6, layer_state_cmp(state, 5)); return state; } diff --git a/keyboards/mechlovin/olly/orion/orion.c b/keyboards/mechlovin/olly/orion/orion.c index 9fc89a6d023..4db9efde053 100644 --- a/keyboards/mechlovin/olly/orion/orion.c +++ b/keyboards/mechlovin/olly/orion/orion.c @@ -32,10 +32,10 @@ void keyboard_pre_init_kb(void) { layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); - writePin(B7, layer_state_cmp(state, 0)); - writePin(B6, layer_state_cmp(state, 1)); - writePin(B5, layer_state_cmp(state, 2)); - writePin(B8, layer_state_cmp(state, 3)); - writePin(B9, layer_state_cmp(state, 4)); + gpio_write_pin(B7, layer_state_cmp(state, 0)); + gpio_write_pin(B6, layer_state_cmp(state, 1)); + gpio_write_pin(B5, layer_state_cmp(state, 2)); + gpio_write_pin(B8, layer_state_cmp(state, 3)); + gpio_write_pin(B9, layer_state_cmp(state, 4)); return state; } diff --git a/keyboards/mechwild/sugarglider/sugarglider.c b/keyboards/mechwild/sugarglider/sugarglider.c index 5db77bca1af..7144d1f9ac4 100644 --- a/keyboards/mechwild/sugarglider/sugarglider.c +++ b/keyboards/mechwild/sugarglider/sugarglider.c @@ -110,10 +110,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B12, led_state.num_lock); // Updates status LEDs - writePin(B13, led_state.caps_lock); // Updates status LEDs - writePin(B14, led_state.scroll_lock); // Updates status LEDs - writePin(C13, !led_state.caps_lock); // Updates status LEDs, this is the LED on the blackpill itself + gpio_write_pin(B12, led_state.num_lock); // Updates status LEDs + gpio_write_pin(B13, led_state.caps_lock); // Updates status LEDs + gpio_write_pin(B14, led_state.scroll_lock); // Updates status LEDs + gpio_write_pin(C13, !led_state.caps_lock); // Updates status LEDs, this is the LED on the blackpill itself } return res; } diff --git a/keyboards/miiiw/common/shift_register.c b/keyboards/miiiw/common/shift_register.c index 1295f1426ae..f95e2062ba9 100644 --- a/keyboards/miiiw/common/shift_register.c +++ b/keyboards/miiiw/common/shift_register.c @@ -82,7 +82,7 @@ static void shift_out(void) { while(n--){ for (uint8_t i = 0; i < 8; i++) { gpio_write_pin_low(SHR_CLOCK_PIN); - writePin(SHR_DATA_PIN, shift_values[n] & (0x80 >> i)); + gpio_write_pin(SHR_DATA_PIN, shift_values[n] & (0x80 >> i)); gpio_write_pin_high(SHR_CLOCK_PIN); } } diff --git a/keyboards/mlego/m48/m48.h b/keyboards/mlego/m48/m48.h index 5acc5c4590b..1d183bbd6d2 100644 --- a/keyboards/mlego/m48/m48.h +++ b/keyboards/mlego/m48/m48.h @@ -21,18 +21,18 @@ along with this program. If not, see . static inline void led_lwr(const bool on) { #ifdef LED_NUM_LOCK_PIN - writePin(LED_NUM_LOCK_PIN, on); + gpio_write_pin(LED_NUM_LOCK_PIN, on); #endif } static inline void led_rse(const bool on) { #ifdef LED_SCROLL_LOCK_PIN - writePin(LED_SCROLL_LOCK_PIN, on); + gpio_write_pin(LED_SCROLL_LOCK_PIN, on); #endif } static inline void led_caps(const bool on) { #ifdef LED_CAPS_LOCK_PIN - writePin(LED_CAPS_LOCK_PIN, !on); + gpio_write_pin(LED_CAPS_LOCK_PIN, !on); #endif } diff --git a/keyboards/mlego/m60/m60.h b/keyboards/mlego/m60/m60.h index 13a56f3ff0d..44245f5e1e3 100644 --- a/keyboards/mlego/m60/m60.h +++ b/keyboards/mlego/m60/m60.h @@ -21,18 +21,18 @@ along with this program. If not, see . static inline void led_lwr(const bool on) { #ifdef LED_NUM_LOCK_PIN - writePin(LED_NUM_LOCK_PIN, on); + gpio_write_pin(LED_NUM_LOCK_PIN, on); #endif } static inline void led_rse(const bool on) { #ifdef LED_SCROLL_LOCK_PIN - writePin(LED_SCROLL_LOCK_PIN, on); + gpio_write_pin(LED_SCROLL_LOCK_PIN, on); #endif } static inline void led_caps(const bool on) { #ifdef LED_CAPS_LOCK_PIN - writePin(LED_CAPS_LOCK_PIN, !on); + gpio_write_pin(LED_CAPS_LOCK_PIN, !on); #endif } diff --git a/keyboards/mlego/m60_split/m60_split.h b/keyboards/mlego/m60_split/m60_split.h index 10be6662c46..203514244fc 100644 --- a/keyboards/mlego/m60_split/m60_split.h +++ b/keyboards/mlego/m60_split/m60_split.h @@ -19,19 +19,19 @@ static inline void led_lwr(const bool on) { #ifdef LED_NUM_LOCK_PIN - writePin(LED_NUM_LOCK_PIN, on); + gpio_write_pin(LED_NUM_LOCK_PIN, on); #endif } static inline void led_rse(const bool on) { #ifdef LED_SCROLL_LOCK_PIN - writePin(LED_SCROLL_LOCK_PIN, on); + gpio_write_pin(LED_SCROLL_LOCK_PIN, on); #endif } static inline void led_caps(const bool on) { #ifdef LED_CAPS_LOCK_PIN - writePin(LED_CAPS_LOCK_PIN, !on); + gpio_write_pin(LED_CAPS_LOCK_PIN, !on); #endif } diff --git a/keyboards/mlego/m65/m65.h b/keyboards/mlego/m65/m65.h index 1c5589c1114..520617e7d66 100644 --- a/keyboards/mlego/m65/m65.h +++ b/keyboards/mlego/m65/m65.h @@ -31,13 +31,13 @@ void set_led_toggle(const uint8_t, const bool); static inline void init_lwr_rse_led(void) { #if defined(LED_LWR_PIN) setPinOutput(LED_LWR_PIN); - writePin(LED_LWR_PIN, false); + gpio_write_pin(LED_LWR_PIN, false); wait_ms(30); #endif #if defined(LED_RSE_PIN) setPinOutput(LED_RSE_PIN); - writePin(LED_RSE_PIN, false); + gpio_write_pin(LED_RSE_PIN, false); wait_ms(30); #endif } @@ -46,9 +46,9 @@ static inline void led_lwr(const bool on) { #if defined(LED_LWR_PIN) if ((PRODUCT_ID == 0x6064) || (PRODUCT_ID == 0x6065) || (PRODUCT_ID == 0x6066) || (PRODUCT_ID == 0x6067)) { - writePin(LED_LWR_PIN, !on); + gpio_write_pin(LED_LWR_PIN, !on); }else{ - writePin(LED_LWR_PIN, on); + gpio_write_pin(LED_LWR_PIN, on); } #endif } @@ -57,9 +57,9 @@ static inline void led_rse(const bool on) { #if defined(LED_RSE_PIN) if ((PRODUCT_ID == 0x6064) || (PRODUCT_ID == 0x6065) || (PRODUCT_ID == 0x6066) || (PRODUCT_ID == 0x6067)) { - writePin(LED_RSE_PIN, !on); + gpio_write_pin(LED_RSE_PIN, !on); }else{ - writePin(LED_RSE_PIN, on); + gpio_write_pin(LED_RSE_PIN, on); } #endif } diff --git a/keyboards/mode/m65ha_alpha/m65ha_alpha.c b/keyboards/mode/m65ha_alpha/m65ha_alpha.c index afb093058f7..dd110fc3f83 100644 --- a/keyboards/mode/m65ha_alpha/m65ha_alpha.c +++ b/keyboards/mode/m65ha_alpha/m65ha_alpha.c @@ -54,12 +54,12 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); } return res; } diff --git a/keyboards/mode/m65hi_alpha/m65hi_alpha.c b/keyboards/mode/m65hi_alpha/m65hi_alpha.c index afb093058f7..dd110fc3f83 100644 --- a/keyboards/mode/m65hi_alpha/m65hi_alpha.c +++ b/keyboards/mode/m65hi_alpha/m65hi_alpha.c @@ -54,12 +54,12 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); } return res; } diff --git a/keyboards/mode/m65s/m65s.c b/keyboards/mode/m65s/m65s.c index 954644310be..f7dd6257f17 100644 --- a/keyboards/mode/m65s/m65s.c +++ b/keyboards/mode/m65s/m65s.c @@ -55,12 +55,12 @@ void led_init_ports(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); } return res; } diff --git a/keyboards/monsgeek/m3/m3.c b/keyboards/monsgeek/m3/m3.c index 3224951a05f..50df007f58b 100644 --- a/keyboards/monsgeek/m3/m3.c +++ b/keyboards/monsgeek/m3/m3.c @@ -143,8 +143,8 @@ void matrix_init_kb(void) { } void housekeeping_task_kb(void){ - writePin(LED_MAC_OS_PIN, (get_highest_layer(default_layer_state) == 3)); - writePin(LED_WIN_LOCK_PIN, keymap_config.no_gui); + gpio_write_pin(LED_MAC_OS_PIN, (get_highest_layer(default_layer_state) == 3)); + gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui); } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { @@ -166,7 +166,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { return false; case GU_TOGG: if (record->event.pressed) { - writePin(LED_WIN_LOCK_PIN, !keymap_config.no_gui); + gpio_write_pin(LED_WIN_LOCK_PIN, !keymap_config.no_gui); } return true; case RGB_TOG: diff --git a/keyboards/monsgeek/m5/m5.c b/keyboards/monsgeek/m5/m5.c index 318a3dd9133..20511bb1a7b 100644 --- a/keyboards/monsgeek/m5/m5.c +++ b/keyboards/monsgeek/m5/m5.c @@ -157,7 +157,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(LED_WIN_LOCK_PIN, keymap_config.no_gui); + gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui); } return res; } diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c index 71b5b6e0f4a..0ea63a46284 100644 --- a/keyboards/neson_design/700e/700e.c +++ b/keyboards/neson_design/700e/700e.c @@ -363,7 +363,7 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); if (rgb_state.state != SELF_TESTING) { if (led_state.caps_lock) { diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c index d91b01567e7..85a74bad66f 100644 --- a/keyboards/neson_design/n6/n6.c +++ b/keyboards/neson_design/n6/n6.c @@ -358,7 +358,7 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); if (rgb_state.state != SELF_TESTING) { if (led_state.caps_lock) { diff --git a/keyboards/novelkeys/nk65b/nk65b.c b/keyboards/novelkeys/nk65b/nk65b.c index 370814aabdf..369bab262fd 100755 --- a/keyboards/novelkeys/nk65b/nk65b.c +++ b/keyboards/novelkeys/nk65b/nk65b.c @@ -24,8 +24,8 @@ void led_init_ports(void) { } layer_state_t layer_state_set_kb(layer_state_t state) { - writePin(A15, !layer_state_cmp(state, 1)); - writePin(B3, !layer_state_cmp(state, 2)); + gpio_write_pin(A15, !layer_state_cmp(state, 1)); + gpio_write_pin(B3, !layer_state_cmp(state, 2)); return layer_state_set_user(state); } diff --git a/keyboards/novelkeys/nk87b/nk87b.c b/keyboards/novelkeys/nk87b/nk87b.c index a0686d5b090..125b5d74049 100644 --- a/keyboards/novelkeys/nk87b/nk87b.c +++ b/keyboards/novelkeys/nk87b/nk87b.c @@ -25,8 +25,8 @@ void led_init_ports(void) { } layer_state_t layer_state_set_kb(layer_state_t state) { - writePin(A3, !layer_state_cmp(state, 1)); - writePin(A4, !layer_state_cmp(state, 2)); + gpio_write_pin(A3, !layer_state_cmp(state, 1)); + gpio_write_pin(A4, !layer_state_cmp(state, 2)); return layer_state_set_user(state); } diff --git a/keyboards/noxary/220/220.c b/keyboards/noxary/220/220.c index caeb13a799d..ad31b04afa5 100644 --- a/keyboards/noxary/220/220.c +++ b/keyboards/noxary/220/220.c @@ -28,7 +28,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(C6, led_state.num_lock); + gpio_write_pin(C6, led_state.num_lock); } return true; } \ No newline at end of file diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c index 60d54a681c5..af8f0a81886 100644 --- a/keyboards/noxary/268_2/268_2.c +++ b/keyboards/noxary/268_2/268_2.c @@ -24,7 +24,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(B0, led_state.caps_lock); + gpio_write_pin(B0, led_state.caps_lock); } return true; } diff --git a/keyboards/noxary/280/280.c b/keyboards/noxary/280/280.c index 8bece8dee18..6174f526aec 100644 --- a/keyboards/noxary/280/280.c +++ b/keyboards/noxary/280/280.c @@ -30,8 +30,8 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(D5, led_state.caps_lock); - writePin(D0, led_state.scroll_lock); + gpio_write_pin(D5, led_state.caps_lock); + gpio_write_pin(D0, led_state.scroll_lock); } return true; } \ No newline at end of file diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c index 54c37b2079c..e45a08a6e67 100644 --- a/keyboards/noxary/x268/x268.c +++ b/keyboards/noxary/x268/x268.c @@ -28,7 +28,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(B0, led_state.caps_lock); + gpio_write_pin(B0, led_state.caps_lock); } return true; } diff --git a/keyboards/nullbitsco/common/bitc_led.c b/keyboards/nullbitsco/common/bitc_led.c index 64d7c7160a7..277f79fb8f5 100644 --- a/keyboards/nullbitsco/common/bitc_led.c +++ b/keyboards/nullbitsco/common/bitc_led.c @@ -19,7 +19,7 @@ void set_bitc_LED(uint8_t mode) { switch(mode) { case LED_ON: setPinOutput(PIN_LED); - writePin(PIN_LED, GPIO_STATE_HIGH); + gpio_write_pin(PIN_LED, GPIO_STATE_HIGH); break; case LED_DIM: @@ -28,7 +28,7 @@ void set_bitc_LED(uint8_t mode) { case LED_OFF: setPinOutput(PIN_LED); - writePin(PIN_LED, GPIO_STATE_LOW); + gpio_write_pin(PIN_LED, GPIO_STATE_LOW); break; default: diff --git a/keyboards/nullbitsco/nibble/big_led.c b/keyboards/nullbitsco/nibble/big_led.c index d66a8081539..7daf96fb258 100644 --- a/keyboards/nullbitsco/nibble/big_led.c +++ b/keyboards/nullbitsco/nibble/big_led.c @@ -25,12 +25,12 @@ void set_big_LED_r(uint8_t mode) { switch(mode) { case LED_ON: setPinOutput(BIG_LED_R_PIN); - writePin(BIG_LED_R_PIN, GPIO_STATE_HIGH); + gpio_write_pin(BIG_LED_R_PIN, GPIO_STATE_HIGH); break; case LED_OFF: setPinOutput(BIG_LED_R_PIN); - writePin(BIG_LED_R_PIN, GPIO_STATE_LOW); + gpio_write_pin(BIG_LED_R_PIN, GPIO_STATE_LOW); break; default: @@ -42,12 +42,12 @@ void set_big_LED_g(uint8_t mode) { switch(mode) { case LED_ON: setPinOutput(BIG_LED_G_PIN); - writePin(BIG_LED_G_PIN, GPIO_STATE_HIGH); + gpio_write_pin(BIG_LED_G_PIN, GPIO_STATE_HIGH); break; case LED_OFF: setPinOutput(BIG_LED_G_PIN); - writePin(BIG_LED_G_PIN, GPIO_STATE_LOW); + gpio_write_pin(BIG_LED_G_PIN, GPIO_STATE_LOW); break; default: @@ -59,12 +59,12 @@ void set_big_LED_b(uint8_t mode) { switch(mode) { case LED_ON: setPinOutput(BIG_LED_B_PIN); - writePin(BIG_LED_B_PIN, GPIO_STATE_HIGH); + gpio_write_pin(BIG_LED_B_PIN, GPIO_STATE_HIGH); break; case LED_OFF: setPinOutput(BIG_LED_B_PIN); - writePin(BIG_LED_B_PIN, GPIO_STATE_LOW); + gpio_write_pin(BIG_LED_B_PIN, GPIO_STATE_LOW); break; default: diff --git a/keyboards/nullbitsco/nibble/matrix.c b/keyboards/nullbitsco/nibble/matrix.c index 59f7ce742d0..b42080a64ec 100644 --- a/keyboards/nullbitsco/nibble/matrix.c +++ b/keyboards/nullbitsco/nibble/matrix.c @@ -44,7 +44,7 @@ static void select_col(uint8_t col) { for (uint8_t bit = 0; bit < MATRIX_MUX_COLS; bit++) { uint8_t state = (col & (0b1 << bit)) >> bit; - writePin(col_pins[bit], state); + gpio_write_pin(col_pins[bit], state); } } diff --git a/keyboards/nullbitsco/scramble/v1/v1.c b/keyboards/nullbitsco/scramble/v1/v1.c index 4b5e8e3e671..aa481205b42 100644 --- a/keyboards/nullbitsco/scramble/v1/v1.c +++ b/keyboards/nullbitsco/scramble/v1/v1.c @@ -7,7 +7,7 @@ void set_scramble_LED(uint8_t mode) { switch(mode) { case LED_ON: setPinOutput(PIN_LED); - writePin(PIN_LED, GPIO_STATE_HIGH); + gpio_write_pin(PIN_LED, GPIO_STATE_HIGH); break; case LED_DIM: @@ -16,7 +16,7 @@ void set_scramble_LED(uint8_t mode) { case LED_OFF: setPinOutput(PIN_LED); - writePin(PIN_LED, GPIO_STATE_LOW); + gpio_write_pin(PIN_LED, GPIO_STATE_LOW); break; default: diff --git a/keyboards/nullbitsco/snap/matrix.c b/keyboards/nullbitsco/snap/matrix.c index 88b1798add9..56e8e1bf607 100644 --- a/keyboards/nullbitsco/snap/matrix.c +++ b/keyboards/nullbitsco/snap/matrix.c @@ -64,7 +64,7 @@ static void select_col(uint8_t col) { // Drive demux with correct column address for (uint8_t bit = 0; bit < MATRIX_MUX_COLS; bit++) { uint8_t state = (col & (0b1 << bit)) >> bit; - writePin(col_pins[bit], !state); + gpio_write_pin(col_pins[bit], !state); } } diff --git a/keyboards/ortho5by12/ortho5by12.c b/keyboards/ortho5by12/ortho5by12.c index 29173749aed..4d7c5401395 100644 --- a/keyboards/ortho5by12/ortho5by12.c +++ b/keyboards/ortho5by12/ortho5by12.c @@ -23,8 +23,8 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(C4, led_state.num_lock); - writePin(C5, led_state.caps_lock); + gpio_write_pin(C4, led_state.num_lock); + gpio_write_pin(C5, led_state.caps_lock); } return res; } diff --git a/keyboards/peej/rosaline/rosaline.c b/keyboards/peej/rosaline/rosaline.c index df0594da44b..0ebcb76660f 100644 --- a/keyboards/peej/rosaline/rosaline.c +++ b/keyboards/peej/rosaline/rosaline.c @@ -17,13 +17,13 @@ #include "quantum.h" bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - writePin(LED1, record->event.pressed); + gpio_write_pin(LED1, record->event.pressed); return process_record_user(keycode, record); } layer_state_t layer_state_set_kb(layer_state_t state) { - writePin(LED2, state); + gpio_write_pin(LED2, state); return layer_state_set_user(state); } diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c index 0a975db381e..b94620e07fd 100644 --- a/keyboards/percent/canoe_gen2/canoe_gen2.c +++ b/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -24,7 +24,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(E6, !led_state.caps_lock); + gpio_write_pin(E6, !led_state.caps_lock); } return true; diff --git a/keyboards/pom_keyboards/tnln95/tnln95.c b/keyboards/pom_keyboards/tnln95/tnln95.c index 12651327eae..2eebe22d732 100644 --- a/keyboards/pom_keyboards/tnln95/tnln95.c +++ b/keyboards/pom_keyboards/tnln95/tnln95.c @@ -28,8 +28,8 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B1, led_state.num_lock); - writePin(B2, led_state.caps_lock); + gpio_write_pin(B1, led_state.num_lock); + gpio_write_pin(B2, led_state.caps_lock); } return res; } diff --git a/keyboards/primekb/meridian/meridian.c b/keyboards/primekb/meridian/meridian.c index c2f740dd145..1781a05b19f 100644 --- a/keyboards/primekb/meridian/meridian.c +++ b/keyboards/primekb/meridian/meridian.c @@ -35,7 +35,7 @@ void keyboard_post_init_user(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - // writePin(B12, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator + // gpio_write_pin(B12, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator if (led_state.caps_lock) { rgblight_setrgb_at(0, 255, 0, 0); //green } else { diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c index 5e5687f7e8b..38e92f1d51f 100644 --- a/keyboards/projectkb/alice/alice.c +++ b/keyboards/projectkb/alice/alice.c @@ -12,9 +12,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); if (runDefault) { - writePin(INDICATOR_PIN_0, !led_state.num_lock); - writePin(INDICATOR_PIN_1, !led_state.caps_lock); - writePin(INDICATOR_PIN_2, !led_state.scroll_lock); + gpio_write_pin(INDICATOR_PIN_0, !led_state.num_lock); + gpio_write_pin(INDICATOR_PIN_1, !led_state.caps_lock); + gpio_write_pin(INDICATOR_PIN_2, !led_state.scroll_lock); } return runDefault; } diff --git a/keyboards/punk75/punk75.c b/keyboards/punk75/punk75.c index aaabefb5aa3..8cd84e84b47 100644 --- a/keyboards/punk75/punk75.c +++ b/keyboards/punk75/punk75.c @@ -26,7 +26,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(LED, !led_state.caps_lock); + gpio_write_pin(LED, !led_state.caps_lock); } return res; } diff --git a/keyboards/quad_h/lb75/lb75.c b/keyboards/quad_h/lb75/lb75.c index 4c8e4f929bf..6c2e2fb4368 100644 --- a/keyboards/quad_h/lb75/lb75.c +++ b/keyboards/quad_h/lb75/lb75.c @@ -30,8 +30,8 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B1, !led_state.caps_lock); - writePin(B2, !led_state.scroll_lock); + gpio_write_pin(B1, !led_state.caps_lock); + gpio_write_pin(B2, !led_state.scroll_lock); } return res; diff --git a/keyboards/rart/rartlite/rartlite.c b/keyboards/rart/rartlite/rartlite.c index 691c68253e1..9bde49b460a 100644 --- a/keyboards/rart/rartlite/rartlite.c +++ b/keyboards/rart/rartlite/rartlite.c @@ -21,6 +21,6 @@ void keyboard_pre_init_kb(void) { } layer_state_t layer_state_set_kb(layer_state_t state) { - writePin(B1, layer_state_cmp(state, 1)); + gpio_write_pin(B1, layer_state_cmp(state, 1)); return layer_state_set_user(state); } diff --git a/keyboards/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c index d7e048e0980..f10e2b5848c 100644 --- a/keyboards/redscarf_i/redscarf_i.c +++ b/keyboards/redscarf_i/redscarf_i.c @@ -30,7 +30,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(F7, !led_state.num_lock); + gpio_write_pin(F7, !led_state.num_lock); } return res; } diff --git a/keyboards/rmi_kb/wete/v1/v1.c b/keyboards/rmi_kb/wete/v1/v1.c index 088ca3c6b70..d592f198a39 100644 --- a/keyboards/rmi_kb/wete/v1/v1.c +++ b/keyboards/rmi_kb/wete/v1/v1.c @@ -26,9 +26,9 @@ void keyboard_pre_init_user(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(A14, !led_state.num_lock); - writePin(A15, !led_state.scroll_lock); - writePin(B3, !led_state.caps_lock); + gpio_write_pin(A14, !led_state.num_lock); + gpio_write_pin(A15, !led_state.scroll_lock); + gpio_write_pin(B3, !led_state.caps_lock); } return res; diff --git a/keyboards/rookiebwoy/neopad/rev1/rev1.c b/keyboards/rookiebwoy/neopad/rev1/rev1.c index b05e8e5954f..03002fa3074 100755 --- a/keyboards/rookiebwoy/neopad/rev1/rev1.c +++ b/keyboards/rookiebwoy/neopad/rev1/rev1.c @@ -37,8 +37,8 @@ layer_state_t layer_state_set_kb(layer_state_t state) { // Layer LEDs act as binary indication of current layer uint8_t layer = get_highest_layer(state); - writePin(LED_00, layer & 0b1); - writePin(LED_01, (layer >> 1) & 0b1); + gpio_write_pin(LED_00, layer & 0b1); + gpio_write_pin(LED_01, (layer >> 1) & 0b1); return state; } diff --git a/keyboards/rubi/rubi.c b/keyboards/rubi/rubi.c index b125ff34a5e..89bf9caa6d4 100644 --- a/keyboards/rubi/rubi.c +++ b/keyboards/rubi/rubi.c @@ -68,7 +68,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(C6, led_state.num_lock); + gpio_write_pin(C6, led_state.num_lock); } return true; } diff --git a/keyboards/sekigon/grs_70ec/ec_switch_matrix.c b/keyboards/sekigon/grs_70ec/ec_switch_matrix.c index 04a02bdd701..42bc97370d3 100644 --- a/keyboards/sekigon/grs_70ec/ec_switch_matrix.c +++ b/keyboards/sekigon/grs_70ec/ec_switch_matrix.c @@ -50,9 +50,9 @@ static inline void init_mux_sel(void) { static inline void select_mux(uint8_t col) { uint8_t ch = col_channels[col]; - writePin(mux_sel_pins[0], ch & 1); - writePin(mux_sel_pins[1], ch & 2); - writePin(mux_sel_pins[2], ch & 4); + gpio_write_pin(mux_sel_pins[0], ch & 1); + gpio_write_pin(mux_sel_pins[1], ch & 2); + gpio_write_pin(mux_sel_pins[2], ch & 4); } static inline void init_row(void) { diff --git a/keyboards/smithrune/iron165r2/iron165r2.c b/keyboards/smithrune/iron165r2/iron165r2.c index 6f1606f89d3..214871f74a5 100644 --- a/keyboards/smithrune/iron165r2/iron165r2.c +++ b/keyboards/smithrune/iron165r2/iron165r2.c @@ -30,6 +30,6 @@ void board_init(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); - if(res) writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); + if(res) gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); return res; } diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c index 9ddc198db87..51917bdc6e5 100644 --- a/keyboards/sneakbox/aliceclone/aliceclone.c +++ b/keyboards/sneakbox/aliceclone/aliceclone.c @@ -28,9 +28,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D7, led_state.num_lock); - writePin(D6, led_state.caps_lock); - writePin(D4, led_state.scroll_lock); + gpio_write_pin(D7, led_state.num_lock); + gpio_write_pin(D6, led_state.caps_lock); + gpio_write_pin(D4, led_state.scroll_lock); } return res; } diff --git a/keyboards/sthlmkb/lagom/matrix.c b/keyboards/sthlmkb/lagom/matrix.c index 256c56d20ca..46f96243031 100644 --- a/keyboards/sthlmkb/lagom/matrix.c +++ b/keyboards/sthlmkb/lagom/matrix.c @@ -44,7 +44,7 @@ static void select_col(uint8_t col) { for (uint8_t bit = 0; bit < MATRIX_MUX_COLS; bit++) { uint8_t state = (col & (0b1 << bit)) >> bit; - writePin(col_pins[bit], state); + gpio_write_pin(col_pins[bit], state); } } diff --git a/keyboards/strech/soulstone/soulstone.c b/keyboards/strech/soulstone/soulstone.c index 3ea03a505a5..1c665ad59b7 100644 --- a/keyboards/strech/soulstone/soulstone.c +++ b/keyboards/strech/soulstone/soulstone.c @@ -25,6 +25,6 @@ void keyboard_post_init_kb(void) { // Function for layer indicator LED layer_state_t layer_state_set_kb(layer_state_t state) { - writePin(LAYER_INDICATOR_LED_PIN, !layer_state_cmp(state, 0)); + gpio_write_pin(LAYER_INDICATOR_LED_PIN, !layer_state_cmp(state, 0)); return layer_state_set_user(state); } diff --git a/keyboards/switchplate/southpaw_65/southpaw_65.c b/keyboards/switchplate/southpaw_65/southpaw_65.c index d75c9b101df..e5cbbe7880b 100644 --- a/keyboards/switchplate/southpaw_65/southpaw_65.c +++ b/keyboards/switchplate/southpaw_65/southpaw_65.c @@ -24,7 +24,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B6, !led_state.caps_lock); + gpio_write_pin(B6, !led_state.caps_lock); } return res; } diff --git a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c index f631e1d95a7..d921292ecf9 100644 --- a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c +++ b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c @@ -42,9 +42,9 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(INDICATOR_NUM, !led_state.num_lock); - writePin(INDICATOR_CAPS, !led_state.caps_lock); - writePin(INDICATOR_SCR, !led_state.scroll_lock); + gpio_write_pin(INDICATOR_NUM, !led_state.num_lock); + gpio_write_pin(INDICATOR_CAPS, !led_state.caps_lock); + gpio_write_pin(INDICATOR_SCR, !led_state.scroll_lock); } return res; } diff --git a/keyboards/team0110/p1800fl/p1800fl.c b/keyboards/team0110/p1800fl/p1800fl.c index c82507ec27a..9f47b8a5c44 100644 --- a/keyboards/team0110/p1800fl/p1800fl.c +++ b/keyboards/team0110/p1800fl/p1800fl.c @@ -19,9 +19,9 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D3, led_state.num_lock); - writePin(D5, led_state.caps_lock); - writePin(C6, led_state.scroll_lock); + gpio_write_pin(D3, led_state.num_lock); + gpio_write_pin(D5, led_state.caps_lock); + gpio_write_pin(C6, led_state.scroll_lock); } return res; } diff --git a/keyboards/tkc/osav2/osav2.c b/keyboards/tkc/osav2/osav2.c index 51f4ac0e04f..e6cb866ef7e 100644 --- a/keyboards/tkc/osav2/osav2.c +++ b/keyboards/tkc/osav2/osav2.c @@ -25,9 +25,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(C7, led_state.num_lock); - writePin(C6, led_state.caps_lock); - writePin(B6, led_state.scroll_lock); + gpio_write_pin(C7, led_state.num_lock); + gpio_write_pin(C6, led_state.caps_lock); + gpio_write_pin(B6, led_state.scroll_lock); } return true; } diff --git a/keyboards/touchpad/matrix.c b/keyboards/touchpad/matrix.c index f35d59dd106..f6259b8c3c0 100644 --- a/keyboards/touchpad/matrix.c +++ b/keyboards/touchpad/matrix.c @@ -231,21 +231,21 @@ uint8_t matrix_scan(void) { for (uint8_t c = 0; c < 6; c++) { for (uint8_t r = 0; r < 6; r++) { switch (r) { - case 0: writePin(D6, matrix_is_on(r, c)); break; - case 1: writePin(B4, matrix_is_on(r, c)); break; - case 2: writePin(B5, matrix_is_on(r, c)); break; - case 3: writePin(B6, matrix_is_on(r, c)); break; - case 4: writePin(C6, matrix_is_on(r, c)); break; - case 5: writePin(C7, matrix_is_on(r, c)); break; + case 0: gpio_write_pin(D6, matrix_is_on(r, c)); break; + case 1: gpio_write_pin(B4, matrix_is_on(r, c)); break; + case 2: gpio_write_pin(B5, matrix_is_on(r, c)); break; + case 3: gpio_write_pin(B6, matrix_is_on(r, c)); break; + case 4: gpio_write_pin(C6, matrix_is_on(r, c)); break; + case 5: gpio_write_pin(C7, matrix_is_on(r, c)); break; } switch (c) { - case 0: writePin(F5, !matrix_is_on(r, c)); break; - case 1: writePin(F4, !matrix_is_on(r, c)); break; - case 2: writePin(F1, !matrix_is_on(r, c)); break; - case 3: writePin(F0, !matrix_is_on(r, c)); break; - case 4: writePin(F6, !matrix_is_on(r, c)); break; - case 5: writePin(F7, !matrix_is_on(r, c)); break; + case 0: gpio_write_pin(F5, !matrix_is_on(r, c)); break; + case 1: gpio_write_pin(F4, !matrix_is_on(r, c)); break; + case 2: gpio_write_pin(F1, !matrix_is_on(r, c)); break; + case 3: gpio_write_pin(F0, !matrix_is_on(r, c)); break; + case 4: gpio_write_pin(F6, !matrix_is_on(r, c)); break; + case 5: gpio_write_pin(F7, !matrix_is_on(r, c)); break; } } } diff --git a/keyboards/tr60w/tr60w.c b/keyboards/tr60w/tr60w.c index 2bc0648241f..ebf48cb1c7b 100644 --- a/keyboards/tr60w/tr60w.c +++ b/keyboards/tr60w/tr60w.c @@ -3,9 +3,9 @@ bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); if (runDefault) { - writePin(B1, !led_state.num_lock); - writePin(B2, !led_state.caps_lock); - writePin(B3, !led_state.scroll_lock); + gpio_write_pin(B1, !led_state.num_lock); + gpio_write_pin(B2, !led_state.caps_lock); + gpio_write_pin(B3, !led_state.scroll_lock); } return runDefault; } diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c index f0c1161cfe3..fca4f4fc87c 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c @@ -21,7 +21,7 @@ void keyboard_post_init_kb(void) // Led pins: // C12 is the left-most led, normally Num Lock, but on Spacesaver M it's Caps Lock. Configured in info.json setPinOutput(C11); // middle led, always off on Spacesaver M - writePin(C11, 0); + gpio_write_pin(C11, 0); setPinOutput(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer } @@ -29,10 +29,10 @@ void keyboard_post_init_kb(void) layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 0: - writePin(C10, 0); + gpio_write_pin(C10, 0); break; default: - writePin(C10, 1); + gpio_write_pin(C10, 1); break; } return layer_state_set_user(state); diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c index 517df0035a3..d950bbf3106 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c @@ -21,17 +21,17 @@ void keyboard_post_init_kb(void) // Led pins: // C12 is the left-most led, normally Num Lock, but on Spacesaver M it's Caps Lock. Configured in info.json setPinOutput(C11); // middle led, always off on Spacesaver M - writePin(C11, 0); + gpio_write_pin(C11, 0); setPinOutput(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer } layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 0: - writePin(C10, 0); + gpio_write_pin(C10, 0); break; default: - writePin(C10, 1); + gpio_write_pin(C10, 1); break; } return layer_state_set_user(state); diff --git a/keyboards/viktus/minne_topre/ec.c b/keyboards/viktus/minne_topre/ec.c index bf7bafc355f..496eed60de2 100644 --- a/keyboards/viktus/minne_topre/ec.c +++ b/keyboards/viktus/minne_topre/ec.c @@ -68,9 +68,9 @@ void init_mux_sel(void) { void select_mux(uint8_t row) { uint8_t ch = row_channels[row]; - writePin(mux_sel_pins[0], ch & 1); - writePin(mux_sel_pins[1], ch & 2); - writePin(mux_sel_pins[2], ch & 4); + gpio_write_pin(mux_sel_pins[0], ch & 1); + gpio_write_pin(mux_sel_pins[1], ch & 2); + gpio_write_pin(mux_sel_pins[2], ch & 4); } void init_col(void) { diff --git a/keyboards/viktus/osav2_numpad_topre/ec.c b/keyboards/viktus/osav2_numpad_topre/ec.c index 2220ef0dbd7..557a4c75a2f 100644 --- a/keyboards/viktus/osav2_numpad_topre/ec.c +++ b/keyboards/viktus/osav2_numpad_topre/ec.c @@ -68,9 +68,9 @@ void init_mux_sel(void) { void select_mux(uint8_t row) { uint8_t ch = row_channels[row]; - writePin(mux_sel_pins[0], ch & 1); - writePin(mux_sel_pins[1], ch & 2); - writePin(mux_sel_pins[2], ch & 4); + gpio_write_pin(mux_sel_pins[0], ch & 1); + gpio_write_pin(mux_sel_pins[1], ch & 2); + gpio_write_pin(mux_sel_pins[2], ch & 4); } void init_col(void) { diff --git a/keyboards/viktus/osav2_topre/ec.c b/keyboards/viktus/osav2_topre/ec.c index 4687674e9db..fc687910a76 100644 --- a/keyboards/viktus/osav2_topre/ec.c +++ b/keyboards/viktus/osav2_topre/ec.c @@ -68,9 +68,9 @@ void init_mux_sel(void) { void select_mux(uint8_t row) { uint8_t ch = row_channels[row]; - writePin(mux_sel_pins[0], ch & 1); - writePin(mux_sel_pins[1], ch & 2); - writePin(mux_sel_pins[2], ch & 4); + gpio_write_pin(mux_sel_pins[0], ch & 1); + gpio_write_pin(mux_sel_pins[1], ch & 2); + gpio_write_pin(mux_sel_pins[2], ch & 4); } void init_col(void) { diff --git a/keyboards/viktus/sp111/sp111.c b/keyboards/viktus/sp111/sp111.c index 523666ed734..13a2ac8c237 100644 --- a/keyboards/viktus/sp111/sp111.c +++ b/keyboards/viktus/sp111/sp111.c @@ -34,9 +34,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - writePin(F0, led_state.num_lock); - writePin(F1, led_state.caps_lock); - writePin(F4, led_state.scroll_lock); + gpio_write_pin(F0, led_state.num_lock); + gpio_write_pin(F1, led_state.caps_lock); + gpio_write_pin(F4, led_state.scroll_lock); } return res; } diff --git a/keyboards/viktus/styrka_topre/ec.c b/keyboards/viktus/styrka_topre/ec.c index 86aced107ff..4a14c89da21 100644 --- a/keyboards/viktus/styrka_topre/ec.c +++ b/keyboards/viktus/styrka_topre/ec.c @@ -69,9 +69,9 @@ void init_mux_sel(void) { void select_mux(uint8_t row) { uint8_t ch = row_channels[row]; - writePin(mux_sel_pins[0], ch & 1); - writePin(mux_sel_pins[1], ch & 2); - writePin(mux_sel_pins[2], ch & 4); + gpio_write_pin(mux_sel_pins[0], ch & 1); + gpio_write_pin(mux_sel_pins[1], ch & 2); + gpio_write_pin(mux_sel_pins[2], ch & 4); } void init_col(void) { diff --git a/keyboards/westfoxtrot/cypher/rev1/rev1.c b/keyboards/westfoxtrot/cypher/rev1/rev1.c index b6736f97a74..eeaa7b4a4cf 100644 --- a/keyboards/westfoxtrot/cypher/rev1/rev1.c +++ b/keyboards/westfoxtrot/cypher/rev1/rev1.c @@ -18,14 +18,14 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(F4, led_state.num_lock); - writePin(F1, led_state.caps_lock); - writePin(F5, led_state.scroll_lock); + gpio_write_pin(F4, led_state.num_lock); + gpio_write_pin(F1, led_state.caps_lock); + gpio_write_pin(F5, led_state.scroll_lock); } return res; } diff --git a/keyboards/westfoxtrot/cypher/rev5/rev5.c b/keyboards/westfoxtrot/cypher/rev5/rev5.c index 477e1298af6..37ca9cf3c16 100644 --- a/keyboards/westfoxtrot/cypher/rev5/rev5.c +++ b/keyboards/westfoxtrot/cypher/rev5/rev5.c @@ -18,14 +18,14 @@ bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(D3, led_state.num_lock); - writePin(D5, led_state.caps_lock); - writePin(D2, led_state.scroll_lock); + gpio_write_pin(D3, led_state.num_lock); + gpio_write_pin(D5, led_state.caps_lock); + gpio_write_pin(D2, led_state.scroll_lock); } return res; } diff --git a/keyboards/westfoxtrot/prophet/prophet.c b/keyboards/westfoxtrot/prophet/prophet.c index 4284fa81a6c..ab59487224a 100644 --- a/keyboards/westfoxtrot/prophet/prophet.c +++ b/keyboards/westfoxtrot/prophet/prophet.c @@ -8,12 +8,12 @@ void keyboard_pre_init_kb (void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B13, led_state.caps_lock); + gpio_write_pin(B13, led_state.caps_lock); } return res; } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePin(B12, layer_state_cmp(state, 1)); + gpio_write_pin(B12, layer_state_cmp(state, 1)); return state; } diff --git a/keyboards/wilba_tech/wt60_xt/wt60_xt.c b/keyboards/wilba_tech/wt60_xt/wt60_xt.c index 87527e7edff..7079d0ce328 100644 --- a/keyboards/wilba_tech/wt60_xt/wt60_xt.c +++ b/keyboards/wilba_tech/wt60_xt/wt60_xt.c @@ -58,7 +58,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(F1, led_state.caps_lock); + gpio_write_pin(F1, led_state.caps_lock); } #ifdef AUDIO_ENABLE diff --git a/keyboards/wilba_tech/wt69_a/wt69_a.c b/keyboards/wilba_tech/wt69_a/wt69_a.c index 718bb0d32f9..d837eb7a3a0 100644 --- a/keyboards/wilba_tech/wt69_a/wt69_a.c +++ b/keyboards/wilba_tech/wt69_a/wt69_a.c @@ -24,7 +24,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(F1, led_state.caps_lock); + gpio_write_pin(F1, led_state.caps_lock); } return true; } diff --git a/keyboards/wilba_tech/wt70_jb/wt70_jb.c b/keyboards/wilba_tech/wt70_jb/wt70_jb.c index 7a879207d60..2bae80cbd5a 100644 --- a/keyboards/wilba_tech/wt70_jb/wt70_jb.c +++ b/keyboards/wilba_tech/wt70_jb/wt70_jb.c @@ -25,7 +25,7 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { - writePin(F1, led_state.caps_lock); + gpio_write_pin(F1, led_state.caps_lock); } return true; } diff --git a/keyboards/wolfmarkclub/wm1/wm1.c b/keyboards/wolfmarkclub/wm1/wm1.c index 370f9c7cfa5..071ccfb7bee 100644 --- a/keyboards/wolfmarkclub/wm1/wm1.c +++ b/keyboards/wolfmarkclub/wm1/wm1.c @@ -14,9 +14,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(B1, led_state.caps_lock); - writePin(B0, led_state.num_lock); - writePin(C5, led_state.scroll_lock); + gpio_write_pin(B1, led_state.caps_lock); + gpio_write_pin(B0, led_state.num_lock); + gpio_write_pin(C5, led_state.scroll_lock); } return true; } diff --git a/keyboards/work_louder/micro/micro.c b/keyboards/work_louder/micro/micro.c index d845a62250c..59eb8b99420 100644 --- a/keyboards/work_louder/micro/micro.c +++ b/keyboards/work_louder/micro/micro.c @@ -50,28 +50,28 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { void work_louder_micro_led_1_on(void) { setPinOutput(WORK_LOUDER_LED_PIN_1); - writePin(WORK_LOUDER_LED_PIN_1, true); + gpio_write_pin(WORK_LOUDER_LED_PIN_1, true); } void work_louder_micro_led_2_on(void) { setPinOutput(WORK_LOUDER_LED_PIN_2); - writePin(WORK_LOUDER_LED_PIN_2, true); + gpio_write_pin(WORK_LOUDER_LED_PIN_2, true); } void work_louder_micro_led_3_on(void) { setPinOutput(WORK_LOUDER_LED_PIN_3); - writePin(WORK_LOUDER_LED_PIN_3, true); + gpio_write_pin(WORK_LOUDER_LED_PIN_3, true); } void work_louder_micro_led_1_off(void) { setPinInput(WORK_LOUDER_LED_PIN_1); - writePin(WORK_LOUDER_LED_PIN_1, false); + gpio_write_pin(WORK_LOUDER_LED_PIN_1, false); } void work_louder_micro_led_2_off(void) { setPinInput(WORK_LOUDER_LED_PIN_2); - writePin(WORK_LOUDER_LED_PIN_2, false); + gpio_write_pin(WORK_LOUDER_LED_PIN_2, false); } void work_louder_micro_led_3_off(void) { setPinInput(WORK_LOUDER_LED_PIN_3); - writePin(WORK_LOUDER_LED_PIN_3, false); + gpio_write_pin(WORK_LOUDER_LED_PIN_3, false); } void work_louder_micro_led_all_on(void) { diff --git a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c index c28ffb85035..1a9ff854590 100644 --- a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c +++ b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c @@ -31,9 +31,9 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(D3, led_state.num_lock); - writePin(D0, led_state.caps_lock); - writePin(D2, led_state.scroll_lock); + gpio_write_pin(D3, led_state.num_lock); + gpio_write_pin(D0, led_state.caps_lock); + gpio_write_pin(D2, led_state.scroll_lock); } return res; } diff --git a/keyboards/wuque/ikki68/ikki68.c b/keyboards/wuque/ikki68/ikki68.c index a61ddf3a565..f55666489e1 100644 --- a/keyboards/wuque/ikki68/ikki68.c +++ b/keyboards/wuque/ikki68/ikki68.c @@ -24,7 +24,7 @@ void matrix_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(C6, !led_state.caps_lock); + gpio_write_pin(C6, !led_state.caps_lock); } return res; } diff --git a/keyboards/yiancardesigns/barleycorn/barleycorn.c b/keyboards/yiancardesigns/barleycorn/barleycorn.c index 9bd5d84d2b5..d7149064183 100644 --- a/keyboards/yiancardesigns/barleycorn/barleycorn.c +++ b/keyboards/yiancardesigns/barleycorn/barleycorn.c @@ -25,13 +25,13 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(B5, led_state.caps_lock); - writePin(C0, led_state.num_lock); + gpio_write_pin(B5, led_state.caps_lock); + gpio_write_pin(C0, led_state.num_lock); } return res; } diff --git a/keyboards/ymdk/yd60mq/yd60mq.c b/keyboards/ymdk/yd60mq/yd60mq.c index 2d4e4f50c74..8b4d3b95be4 100644 --- a/keyboards/ymdk/yd60mq/yd60mq.c +++ b/keyboards/ymdk/yd60mq/yd60mq.c @@ -10,12 +10,12 @@ __attribute__((weak)) bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if (res) { - // writePin sets the pin high for 1 and low for 0. + // gpio_write_pin sets the pin high for 1 and low for 0. // In this example the pins are inverted, setting // it low/0 turns it on, and high/1 turns the LED off. // This behavior depends on whether the LED is between the pin // and VCC or the pin and GND. - writePin(F4, !led_state.caps_lock); + gpio_write_pin(F4, !led_state.caps_lock); } return res; } diff --git a/keyboards/zsa/moonlander/moonlander.h b/keyboards/zsa/moonlander/moonlander.h index 0e5282c511a..3e1f39ad964 100644 --- a/keyboards/zsa/moonlander/moonlander.h +++ b/keyboards/zsa/moonlander/moonlander.h @@ -26,9 +26,9 @@ extern bool mcp23018_leds[]; #define MCP23018_DEFAULT_ADDRESS 0b0100000 -#define ML_LED_1(status) writePin(B5, (bool)status) -#define ML_LED_2(status) writePin(B4, (bool)status) -#define ML_LED_3(status) writePin(B3, (bool)status) +#define ML_LED_1(status) gpio_write_pin(B5, (bool)status) +#define ML_LED_2(status) gpio_write_pin(B4, (bool)status) +#define ML_LED_3(status) gpio_write_pin(B3, (bool)status) #define ML_LED_4(status) mcp23018_leds[0] = (bool)status #define ML_LED_5(status) mcp23018_leds[1] = (bool)status