Browse Source

Update GPIO API usage in keyboard code - `writePin`

pull/23361/head
fauxpark 1 month ago
parent
commit
753d9c43ca
174 changed files with 464 additions and 464 deletions
  1. +8
    -8
      keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c
  2. +2
    -2
      keyboards/acheron/athena/alpha/alpha.c
  3. +2
    -2
      keyboards/acheron/athena/beta/beta.c
  4. +3
    -3
      keyboards/acheron/austin/austin.c
  5. +16
    -16
      keyboards/acheron/elongate/delta/delta.c
  6. +3
    -3
      keyboards/aeboards/ext65/rev1/rev1.c
  7. +3
    -3
      keyboards/aeboards/ext65/rev2/rev2.c
  8. +6
    -6
      keyboards/ai03/orbit/orbit.c
  9. +2
    -2
      keyboards/ai03/vega/vega.c
  10. +2
    -2
      keyboards/akko/5087/5087.c
  11. +1
    -1
      keyboards/akko/5108/5108.c
  12. +6
    -6
      keyboards/atlantis/ps17/ps17.c
  13. +1
    -1
      keyboards/bear_face/v1/v1.c
  14. +1
    -1
      keyboards/bear_face/v2/v2.c
  15. +1
    -1
      keyboards/bioi/g60/g60.c
  16. +1
    -1
      keyboards/bioi/morgan65/morgan65.c
  17. +1
    -1
      keyboards/bioi/s65/s65.c
  18. +1
    -1
      keyboards/bobpad/bobpad.c
  19. +3
    -3
      keyboards/cheshire/curiosity/curiosity.c
  20. +1
    -1
      keyboards/cipulot/common/ec_switch_matrix.c
  21. +3
    -3
      keyboards/clueboard/2x1800/2019/2019.c
  22. +4
    -4
      keyboards/clueboard/66/rev4/rev4.c
  23. +16
    -16
      keyboards/dark/magnum_ergo_1/magnum_ergo_1.c
  24. +1
    -1
      keyboards/darkproject/kd83a_bfg_edition/kd83a_bfg_edition.c
  25. +1
    -1
      keyboards/darkproject/kd87a_bfg_edition/kd87a_bfg_edition.c
  26. +2
    -2
      keyboards/dm9records/lain/lain.c
  27. +3
    -3
      keyboards/doppelganger/doppelganger.c
  28. +1
    -1
      keyboards/drop/lib/mux.c
  29. +3
    -3
      keyboards/duck/orion/v3/v3.c
  30. +2
    -2
      keyboards/dumbpad/v0x/v0x.c
  31. +2
    -2
      keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c
  32. +2
    -2
      keyboards/dumbpad/v0x_right/v0x_right.c
  33. +3
    -3
      keyboards/dumbpad/v1x/v1x.c
  34. +3
    -3
      keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c
  35. +3
    -3
      keyboards/dumbpad/v1x_right/v1x_right.c
  36. +3
    -3
      keyboards/dumbpad/v3x/v3x.c
  37. +1
    -1
      keyboards/dztech/bocc/bocc.c
  38. +1
    -1
      keyboards/ealdin/quadrant/quadrant.c
  39. +12
    -12
      keyboards/edda/edda.c
  40. +1
    -1
      keyboards/enviousdesign/commissions/mini1800/mini1800.c
  41. +1
    -1
      keyboards/evyd13/gh80_3700/gh80_3700.c
  42. +1
    -1
      keyboards/evyd13/pockettype/pockettype.c
  43. +2
    -2
      keyboards/exclusive/e6v2/oe/oe.c
  44. +2
    -2
      keyboards/exclusive/e85/hotswap/hotswap.c
  45. +2
    -2
      keyboards/exclusive/e85/soldered/soldered.c
  46. +1
    -1
      keyboards/fjlabs/bolsa65/bolsa65.c
  47. +2
    -2
      keyboards/flx/virgo/virgo.c
  48. +1
    -1
      keyboards/geonworks/ee_at/ee_at.c
  49. +1
    -1
      keyboards/geonworks/w1_at/w1_at.c
  50. +2
    -2
      keyboards/ghs/rar/rar.c
  51. +1
    -1
      keyboards/gray_studio/think65/solder/solder.c
  52. +4
    -4
      keyboards/handwired/colorlice/colorlice.c
  53. +3
    -3
      keyboards/handwired/evk/v1_3/v1_3.c
  54. +2
    -2
      keyboards/handwired/jtallbean/split_65/split_65.c
  55. +3
    -3
      keyboards/handwired/prime_exl_plus/prime_exl_plus.c
  56. +3
    -3
      keyboards/handwired/retro_refit/retro_refit.c
  57. +3
    -3
      keyboards/handwired/selene/selene.c
  58. +3
    -3
      keyboards/handwired/sono1/sono1.c
  59. +4
    -4
      keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
  60. +2
    -2
      keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extension_74hc15x.c
  61. +3
    -3
      keyboards/handwired/z150/z150.c
  62. +3
    -3
      keyboards/heliar/wm1_hotswap/wm1_hotswap.c
  63. +2
    -2
      keyboards/hhkb/yang/yang.c
  64. +1
    -1
      keyboards/hineybush/h10/h10.c
  65. +1
    -1
      keyboards/hineybush/h60/h60.c
  66. +2
    -2
      keyboards/hineybush/h87a/h87a.c
  67. +2
    -2
      keyboards/hineybush/h88/h88.c
  68. +3
    -3
      keyboards/hineybush/physix/physix.c
  69. +3
    -3
      keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c
  70. +1
    -1
      keyboards/ibm/model_m/modelh/modelh.c
  71. +4
    -4
      keyboards/ibm/model_m/mschwingen/mschwingen.c
  72. +3
    -3
      keyboards/ibm/model_m/teensypp/teensypp.c
  73. +3
    -3
      keyboards/ibm/model_m/yugo_m/yugo_m.c
  74. +3
    -3
      keyboards/ilumkb/volcano660/volcano660.c
  75. +1
    -1
      keyboards/jae/j01/j01.c
  76. +2
    -2
      keyboards/jels/jels88/jels88.c
  77. +8
    -8
      keyboards/jian/nsrev2/config.h
  78. +8
    -8
      keyboards/jian/rev1/config.h
  79. +8
    -8
      keyboards/jian/rev2/config.h
  80. +1
    -1
      keyboards/jukaie/jk01/jk01.c
  81. +1
    -1
      keyboards/kabedon/kabedon980/kabedon980.c
  82. +1
    -1
      keyboards/kbdfans/bella/soldered/soldered.c
  83. +1
    -1
      keyboards/kbdfans/maja_soldered/maja_soldered.c
  84. +5
    -5
      keyboards/kbdmania/kmac/matrix.c
  85. +1
    -1
      keyboards/kc60se/kc60se.c
  86. +1
    -1
      keyboards/keebio/kbo5000/rev1/rev1.c
  87. +1
    -1
      keyboards/keebio/quefrency/rev2/rev2.c
  88. +1
    -1
      keyboards/keebio/quefrency/rev3/rev3.c
  89. +1
    -1
      keyboards/keebio/sinc/sinc.c
  90. +1
    -1
      keyboards/keyhive/lattice60/lattice60.c
  91. +2
    -2
      keyboards/kkatano/wallaby/wallaby.c
  92. +2
    -2
      keyboards/kkatano/yurei/yurei.c
  93. +2
    -2
      keyboards/kopibeng/mnk88/mnk88.c
  94. +3
    -3
      keyboards/kopibeng/xt8x/xt8x.c
  95. +8
    -8
      keyboards/ktec/ergodone/ergodox_compat.h
  96. +2
    -2
      keyboards/marksard/leftover30/leftover30.c
  97. +2
    -2
      keyboards/masterworks/classy_tkl/rev_a/rev_a.c
  98. +3
    -3
      keyboards/matrix/cain_re/cain_re.c
  99. +3
    -3
      keyboards/matrix/m12og/rev2/rev2.c
  100. +2
    -2
      keyboards/mc_76k/mc_76k.c

+ 8
- 8
keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c View File

@ -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);


+ 2
- 2
keyboards/acheron/athena/alpha/alpha.c View File

@ -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;
}

+ 2
- 2
keyboards/acheron/athena/beta/beta.c View File

@ -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;
}

+ 3
- 3
keyboards/acheron/austin/austin.c View File

@ -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;
}

+ 16
- 16
keyboards/acheron/elongate/delta/delta.c View File

@ -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);
}

+ 3
- 3
keyboards/aeboards/ext65/rev1/rev1.c View File

@ -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;
}


+ 3
- 3
keyboards/aeboards/ext65/rev2/rev2.c View File

@ -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;
}


+ 6
- 6
keyboards/ai03/orbit/orbit.c View File

@ -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;


+ 2
- 2
keyboards/ai03/vega/vega.c View File

@ -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;
}

+ 2
- 2
keyboards/akko/5087/5087.c View File

@ -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) {


+ 1
- 1
keyboards/akko/5108/5108.c View File

@ -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;
}

+ 6
- 6
keyboards/atlantis/ps17/ps17.c View File

@ -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();
}


+ 1
- 1
keyboards/bear_face/v1/v1.c View File

@ -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;
}

+ 1
- 1
keyboards/bear_face/v2/v2.c View File

@ -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;
}

+ 1
- 1
keyboards/bioi/g60/g60.c View File

@ -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;
}

+ 1
- 1
keyboards/bioi/morgan65/morgan65.c View File

@ -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;
}

+ 1
- 1
keyboards/bioi/s65/s65.c View File

@ -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;
}

+ 1
- 1
keyboards/bobpad/bobpad.c View File

@ -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;
};


+ 3
- 3
keyboards/cheshire/curiosity/curiosity.c View File

@ -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;
}

+ 1
- 1
keyboards/cipulot/common/ec_switch_matrix.c View File

@ -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]);


+ 3
- 3
keyboards/clueboard/2x1800/2019/2019.c View File

@ -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;


+ 4
- 4
keyboards/clueboard/66/rev4/rev4.c View File

@ -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;
}

+ 16
- 16
keyboards/dark/magnum_ergo_1/magnum_ergo_1.c View File

@ -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;
}


+ 1
- 1
keyboards/darkproject/kd83a_bfg_edition/kd83a_bfg_edition.c View File

@ -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) {


+ 1
- 1
keyboards/darkproject/kd87a_bfg_edition/kd87a_bfg_edition.c View File

@ -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) {


+ 2
- 2
keyboards/dm9records/lain/lain.c View File

@ -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);
}
}


+ 3
- 3
keyboards/doppelganger/doppelganger.c View File

@ -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;
}


+ 1
- 1
keyboards/drop/lib/mux.c View File

@ -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;


+ 3
- 3
keyboards/duck/orion/v3/v3.c View File

@ -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;
}

+ 2
- 2
keyboards/dumbpad/v0x/v0x.c View File

@ -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);
}


+ 2
- 2
keyboards/dumbpad/v0x_dualencoder/v0x_dualencoder.c View File

@ -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);
}


+ 2
- 2
keyboards/dumbpad/v0x_right/v0x_right.c View File

@ -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);
}


+ 3
- 3
keyboards/dumbpad/v1x/v1x.c View File

@ -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;
}

+ 3
- 3
keyboards/dumbpad/v1x_dualencoder/v1x_dualencoder.c View File

@ -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;
}

+ 3
- 3
keyboards/dumbpad/v1x_right/v1x_right.c View File

@ -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;
}

+ 3
- 3
keyboards/dumbpad/v3x/v3x.c View File

@ -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;
}

+ 1
- 1
keyboards/dztech/bocc/bocc.c View File

@ -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;
}

+ 1
- 1
keyboards/ealdin/quadrant/quadrant.c View File

@ -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;
}

+ 12
- 12
keyboards/edda/edda.c View File

@ -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;


+ 1
- 1
keyboards/enviousdesign/commissions/mini1800/mini1800.c View File

@ -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;
}


+ 1
- 1
keyboards/evyd13/gh80_3700/gh80_3700.c View File

@ -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;

+ 1
- 1
keyboards/evyd13/pockettype/pockettype.c View File

@ -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;


+ 2
- 2
keyboards/exclusive/e6v2/oe/oe.c View File

@ -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;
}

+ 2
- 2
keyboards/exclusive/e85/hotswap/hotswap.c View File

@ -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;
}

+ 2
- 2
keyboards/exclusive/e85/soldered/soldered.c View File

@ -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;
}

+ 1
- 1
keyboards/fjlabs/bolsa65/bolsa65.c View File

@ -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;
}

+ 2
- 2
keyboards/flx/virgo/virgo.c View File

@ -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;
}

+ 1
- 1
keyboards/geonworks/ee_at/ee_at.c View File

@ -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);
}

+ 1
- 1
keyboards/geonworks/w1_at/w1_at.c View File

@ -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);
}

+ 2
- 2
keyboards/ghs/rar/rar.c View File

@ -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;


+ 1
- 1
keyboards/gray_studio/think65/solder/solder.c View File

@ -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;
}

+ 4
- 4
keyboards/handwired/colorlice/colorlice.c View File

@ -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;
}

+ 3
- 3
keyboards/handwired/evk/v1_3/v1_3.c View File

@ -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;
}

+ 2
- 2
keyboards/handwired/jtallbean/split_65/split_65.c View File

@ -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;
}

+ 3
- 3
keyboards/handwired/prime_exl_plus/prime_exl_plus.c View File

@ -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;
}


+ 3
- 3
keyboards/handwired/retro_refit/retro_refit.c View File

@ -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;

+ 3
- 3
keyboards/handwired/selene/selene.c View File

@ -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;
}

+ 3
- 3
keyboards/handwired/sono1/sono1.c View File

@ -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;
}

+ 4
- 4
keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c View File

@ -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);


+ 2
- 2
keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extension_74hc15x.c View File

@ -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
}


+ 3
- 3
keyboards/handwired/z150/z150.c View File

@ -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;
}

+ 3
- 3
keyboards/heliar/wm1_hotswap/wm1_hotswap.c View File

@ -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;


+ 2
- 2
keyboards/hhkb/yang/yang.c View File

@ -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;
}

+ 1
- 1
keyboards/hineybush/h10/h10.c View File

@ -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;
}

+ 1
- 1
keyboards/hineybush/h60/h60.c View File

@ -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;
}


+ 2
- 2
keyboards/hineybush/h87a/h87a.c View File

@ -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;
}


+ 2
- 2
keyboards/hineybush/h88/h88.c View File

@ -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;
}


+ 3
- 3
keyboards/hineybush/physix/physix.c View File

@ -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);


+ 3
- 3
keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c View File

@ -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;
}

+ 1
- 1
keyboards/ibm/model_m/modelh/modelh.c View File

@ -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();
}

+ 4
- 4
keyboards/ibm/model_m/mschwingen/mschwingen.c View File

@ -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);
}
}


+ 3
- 3
keyboards/ibm/model_m/teensypp/teensypp.c View File

@ -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;
}

+ 3
- 3
keyboards/ibm/model_m/yugo_m/yugo_m.c View File

@ -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;
}

+ 3
- 3
keyboards/ilumkb/volcano660/volcano660.c View File

@ -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;


+ 1
- 1
keyboards/jae/j01/j01.c View File

@ -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;


+ 2
- 2
keyboards/jels/jels88/jels88.c View File

@ -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;
}

+ 8
- 8
keyboards/jian/nsrev2/config.h View File

@ -59,31 +59,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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

+ 8
- 8
keyboards/jian/rev1/config.h View File

@ -41,33 +41,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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


+ 8
- 8
keyboards/jian/rev2/config.h View File

@ -47,31 +47,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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

+ 1
- 1
keyboards/jukaie/jk01/jk01.c View File

@ -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) {


+ 1
- 1
keyboards/kabedon/kabedon980/kabedon980.c View File

@ -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;
}

+ 1
- 1
keyboards/kbdfans/bella/soldered/soldered.c View File

@ -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;
}

+ 1
- 1
keyboards/kbdfans/maja_soldered/maja_soldered.c View File

@ -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;
}

+ 5
- 5
keyboards/kbdmania/kmac/matrix.c View File

@ -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);
}


+ 1
- 1
keyboards/kc60se/kc60se.c View File

@ -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;
}


+ 1
- 1
keyboards/keebio/kbo5000/rev1/rev1.c View File

@ -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;
}


+ 1
- 1
keyboards/keebio/quefrency/rev2/rev2.c View File

@ -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;
}


+ 1
- 1
keyboards/keebio/quefrency/rev3/rev3.c View File

@ -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;
}


+ 1
- 1
keyboards/keebio/sinc/sinc.c View File

@ -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;
}


+ 1
- 1
keyboards/keyhive/lattice60/lattice60.c View File

@ -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;
}

+ 2
- 2
keyboards/kkatano/wallaby/wallaby.c View File

@ -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;
}

+ 2
- 2
keyboards/kkatano/yurei/yurei.c View File

@ -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;
}

+ 2
- 2
keyboards/kopibeng/mnk88/mnk88.c View File

@ -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;
}

+ 3
- 3
keyboards/kopibeng/xt8x/xt8x.c View File

@ -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;
}

+ 8
- 8
keyboards/ktec/ergodone/ergodox_compat.h View File

@ -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();


+ 2
- 2
keyboards/marksard/leftover30/leftover30.c View File

@ -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;
}

+ 2
- 2
keyboards/masterworks/classy_tkl/rev_a/rev_a.c View File

@ -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;
}

+ 3
- 3
keyboards/matrix/cain_re/cain_re.c View File

@ -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;
}

+ 3
- 3
keyboards/matrix/m12og/rev2/rev2.c View File

@ -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;
}

+ 2
- 2
keyboards/mc_76k/mc_76k.c View File

@ -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;
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save