Browse Source

Update GPIO API usage in keyboard code - `readPin`

pull/23361/head
fauxpark 1 month ago
parent
commit
0b7f0667f3
99 changed files with 180 additions and 180 deletions
  1. +1
    -1
      keyboards/3w6/rev1/matrix.c
  2. +1
    -1
      keyboards/3w6/rev2/matrix.c
  3. +1
    -1
      keyboards/al1/matrix.c
  4. +1
    -1
      keyboards/argyle/matrix.c
  5. +2
    -2
      keyboards/bandominedoni/bandominedoni.c
  6. +1
    -1
      keyboards/barleycorn_smd/matrix.c
  7. +1
    -1
      keyboards/bastardkb/charybdis/charybdis.c
  8. +1
    -1
      keyboards/clueboard/2x1800/2019/2019.c
  9. +4
    -4
      keyboards/converter/palm_usb/matrix.c
  10. +1
    -1
      keyboards/converter/siemens_tastatur/matrix.c
  11. +2
    -2
      keyboards/converter/xt_usb/xt.h
  12. +1
    -1
      keyboards/custommk/evo70_r2/matrix.c
  13. +1
    -1
      keyboards/doppelganger/doppelganger.c
  14. +5
    -5
      keyboards/dp60/matrix.c
  15. +1
    -1
      keyboards/durgod/k310/k310.c
  16. +1
    -1
      keyboards/durgod/k320/k320.c
  17. +1
    -1
      keyboards/evyd13/wasdat/matrix.c
  18. +1
    -1
      keyboards/evyd13/wasdat_code/matrix.c
  19. +1
    -1
      keyboards/ferris/0_1/matrix.c
  20. +1
    -1
      keyboards/ferris/0_2/matrix.c
  21. +1
    -1
      keyboards/geistmaschine/macropod/matrix.c
  22. +2
    -2
      keyboards/gl516/a52gl/matrix.c
  23. +2
    -2
      keyboards/gl516/j73gl/matrix.c
  24. +2
    -2
      keyboards/gl516/n51gl/matrix.c
  25. +1
    -1
      keyboards/gmmk/numpad/matrix.c
  26. +2
    -2
      keyboards/halfcliff/matrix.c
  27. +1
    -1
      keyboards/handwired/lagrange/lagrange.c
  28. +1
    -1
      keyboards/handwired/owlet60/matrix.c
  29. +5
    -5
      keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
  30. +3
    -3
      keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c
  31. +1
    -1
      keyboards/hazel/bad_wings/matrix.c
  32. +2
    -2
      keyboards/hhkb/yang/matrix.c
  33. +2
    -2
      keyboards/hineybush/hbcp/matrix.c
  34. +1
    -1
      keyboards/ingrained/matrix.c
  35. +1
    -1
      keyboards/jones/v03/matrix.c
  36. +1
    -1
      keyboards/jones/v03_1/matrix.c
  37. +3
    -3
      keyboards/joshajohnson/hub16/matrix.c
  38. +1
    -1
      keyboards/kagizaraya/chidori/board.c
  39. +2
    -2
      keyboards/kakunpc/angel64/alpha/matrix.c
  40. +2
    -2
      keyboards/kakunpc/angel64/rev1/matrix.c
  41. +2
    -2
      keyboards/kakunpc/choc_taro/matrix.c
  42. +2
    -2
      keyboards/kakunpc/thedogkeyboard/matrix.c
  43. +2
    -2
      keyboards/kbdmania/kmac/matrix.c
  44. +2
    -2
      keyboards/kbdmania/kmac_pad/matrix.c
  45. +1
    -1
      keyboards/keychron/c2_pro/matrix.c
  46. +1
    -1
      keyboards/keychron/q10/matrix.c
  47. +1
    -1
      keyboards/keychron/q12/matrix.c
  48. +1
    -1
      keyboards/keychron/q1v2/matrix.c
  49. +1
    -1
      keyboards/keychron/q3/matrix.c
  50. +1
    -1
      keyboards/keychron/q5/matrix.c
  51. +1
    -1
      keyboards/keychron/q6/matrix.c
  52. +1
    -1
      keyboards/keychron/q65/matrix.c
  53. +1
    -1
      keyboards/keychron/v1/matrix.c
  54. +1
    -1
      keyboards/keychron/v10/matrix.c
  55. +1
    -1
      keyboards/keychron/v3/matrix.c
  56. +1
    -1
      keyboards/keychron/v5/matrix.c
  57. +1
    -1
      keyboards/keychron/v6/matrix.c
  58. +2
    -2
      keyboards/kinesis/nguyenvietyen/matrix.c
  59. +7
    -7
      keyboards/ktec/ergodone/matrix.c
  60. +1
    -1
      keyboards/lz/erghost/matrix.c
  61. +1
    -1
      keyboards/macrocat/macrocat.c
  62. +1
    -1
      keyboards/matrix/m12og/rev1/matrix.c
  63. +2
    -2
      keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c
  64. +2
    -2
      keyboards/mechlovin/infinity87/rev2/matrix.c
  65. +2
    -2
      keyboards/mechlovin/infinity875/matrix.c
  66. +1
    -1
      keyboards/mechlovin/olly/bb/matrix.c
  67. +3
    -3
      keyboards/mechlovin/olly/jf/rev1/matrix.c
  68. +2
    -2
      keyboards/mechlovin/serratus/matrix.c
  69. +2
    -2
      keyboards/mexsistor/ludmila/matrix.c
  70. +2
    -2
      keyboards/miiiw/blackio83/blackio83.c
  71. +1
    -1
      keyboards/miiiw/blackio83/matrix.c
  72. +1
    -1
      keyboards/nullbitsco/nibble/matrix.c
  73. +2
    -2
      keyboards/nullbitsco/snap/matrix.c
  74. +2
    -2
      keyboards/om60/matrix.c
  75. +2
    -2
      keyboards/pica40/rev2/rev2.c
  76. +1
    -1
      keyboards/planck/rev6_drop/matrix.c
  77. +2
    -2
      keyboards/planck/rev7/matrix.c
  78. +6
    -6
      keyboards/qvex/lynepad/lynepad.c
  79. +7
    -7
      keyboards/qvex/lynepad2/matrix.c
  80. +2
    -2
      keyboards/rate/pistachio_pro/matrix.c
  81. +3
    -3
      keyboards/redscarf_iiplus/verb/matrix.c
  82. +3
    -3
      keyboards/redscarf_iiplus/verc/matrix.c
  83. +3
    -3
      keyboards/redscarf_iiplus/verd/matrix.c
  84. +6
    -6
      keyboards/ryanskidmore/rskeys100/matrix.c
  85. +5
    -5
      keyboards/snes_macropad/matrix.c
  86. +1
    -1
      keyboards/splitkb/aurora/helix/rev1/rev1.c
  87. +1
    -1
      keyboards/sthlmkb/lagom/matrix.c
  88. +1
    -1
      keyboards/torn/matrix.c
  89. +1
    -1
      keyboards/touchpad/matrix.c
  90. +1
    -1
      keyboards/tzarc/djinn/djinn_portscan_matrix.c
  91. +1
    -1
      keyboards/tzarc/ghoul/ghoul.c
  92. +1
    -1
      keyboards/viktus/sp111/matrix.c
  93. +1
    -1
      keyboards/vitamins_included/rev2/rev2.c
  94. +1
    -1
      keyboards/work_louder/micro/matrix.c
  95. +1
    -1
      keyboards/ydkb/grape/matrix.c
  96. +1
    -1
      keyboards/yiancardesigns/barleycorn/matrix.c
  97. +1
    -1
      keyboards/yiancardesigns/gingham/matrix.c
  98. +1
    -1
      keyboards/yiancardesigns/seigaiha/matrix.c
  99. +7
    -7
      keyboards/zsa/moonlander/matrix.c

+ 1
- 1
keyboards/3w6/rev1/matrix.c View File

@ -177,7 +177,7 @@ static matrix_row_t read_cols(uint8_t row) {
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);


+ 1
- 1
keyboards/3w6/rev2/matrix.c View File

@ -177,7 +177,7 @@ static matrix_row_t read_cols(uint8_t row) {
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);


+ 1
- 1
keyboards/al1/matrix.c View File

@ -65,7 +65,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 1
- 1
keyboards/argyle/matrix.c View File

@ -46,7 +46,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return (readPin(pin) == 0) ? 0 : 1;
return (gpio_read_pin(pin) == 0) ? 0 : 1;
} else {
return 1;
}


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

@ -75,7 +75,7 @@ static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) {
writePinLow(out_pin);
// It's almost unnecessary, but wait until it's down to low, just in case.
wait_us(1);
uint8_t pin_state = readPin(in_pin);
uint8_t pin_state = gpio_read_pin(in_pin);
// Set out_pin to a setting that is less susceptible to noise.
setPinInputHigh(out_pin);
matrix_io_delay(); // Wait for the pull-up to go HIGH.
@ -94,7 +94,7 @@ static enum { UNKNOWN, LEFT, RIGHT } hand_side = UNKNOWN;
#if defined(SPLIT_HAND_PIN)
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
setPinInput(SPLIT_HAND_PIN);
hand_side = readPin(SPLIT_HAND_PIN) ? LEFT : RIGHT;
hand_side = gpio_read_pin(SPLIT_HAND_PIN) ? LEFT : RIGHT;
return (hand_side == LEFT);
#elif defined(SPLIT_HAND_MATRIX_GRID)
# ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT


+ 1
- 1
keyboards/barleycorn_smd/matrix.c View File

@ -113,7 +113,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
pin_state = port_expander_col_buffer[1] & (1 << 1);
break;
default :
pin_state = readPin(col_pins[col_index]);
pin_state = gpio_read_pin(col_pins[col_index]);
}
// Populate the matrix row with the state of the col pin


+ 1
- 1
keyboards/bastardkb/charybdis/charybdis.c View File

@ -376,7 +376,7 @@ void keyboard_pre_init_kb(void) {
}
void matrix_scan_kb(void) {
if (!readPin(A0)) {
if (!gpio_read_pin(A0)) {
reset_keyboard();
}
matrix_scan_user();


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

@ -65,7 +65,7 @@ void matrix_scan_kb(void) {
#ifdef SHAKE_ENABLE
// Read the current state of the tilt sensor. It is physically
// impossible for both pins to register a low state at the same time.
uint8_t tilt_read = (readPin(SHAKE_PIN_A) << 4) | readPin(SHAKE_PIN_B);
uint8_t tilt_read = (gpio_read_pin(SHAKE_PIN_A) << 4) | gpio_read_pin(SHAKE_PIN_B);
// Check to see if the tilt sensor has changed state since our last read
if (tilt_state != tilt_read) {


+ 4
- 4
keyboards/converter/palm_usb/matrix.c View File

@ -113,9 +113,9 @@ void pins_init(void) {
#endif
/* check that the other side isn't powered up.
test=readPin(DCD_PIN);
test=gpio_read_pin(DCD_PIN);
xprintf("b%02X:", test);
test=readPin(RTS_PIN);
test=gpio_read_pin(RTS_PIN);
xprintf("%02X\n", test);
*/
@ -128,7 +128,7 @@ uint8_t rts_reset(void) {
// On boot, we keep rts as input, then switch roles here
// on leaving sleep, we toggle the same way
firstread=readPin(RTS_PIN);
firstread=gpio_read_pin(RTS_PIN);
// printf("r%02X:", firstread);
setPinOutput(RTS_PIN);
@ -264,7 +264,7 @@ void matrix_init(void)
}
#else /// Palm / HP device with DCD
while( !readPin(DCD_PIN) ) {;}
while( !gpio_read_pin(DCD_PIN) ) {;}
print("dcd\n");
rts_reset(); // at this point the keyboard should think all is well.


+ 1
- 1
keyboards/converter/siemens_tastatur/matrix.c View File

@ -210,7 +210,7 @@ uint8_t matrix_scan(void) {
matrix[3] = 0x00;
}
//Special case for Shift
if (readPin(B11) == 0) { matrix[3] |= 0x01; }
if (gpio_read_pin(B11) == 0) { matrix[3] |= 0x01; }
porta_buffer = 65535;
portb_buffer = 65535;


+ 2
- 2
keyboards/converter/xt_usb/xt.h View File

@ -46,7 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
writePinHigh(XT_DATA_PIN); \
} while (0)
#define XT_DATA_READ() readPin(XT_DATA_PIN)
#define XT_DATA_READ() gpio_read_pin(XT_DATA_PIN)
#define XT_DATA_LO() \
do { \
@ -60,7 +60,7 @@ POSSIBILITY OF SUCH DAMAGE.
writePinHigh(XT_CLOCK_PIN); \
} while (0)
#define XT_CLOCK_READ() readPin(XT_CLOCK_PIN)
#define XT_CLOCK_READ() gpio_read_pin(XT_CLOCK_PIN)
#define XT_CLOCK_LO() \
do { \


+ 1
- 1
keyboards/custommk/evo70_r2/matrix.c View File

@ -9,7 +9,7 @@ void matrix_wait_for_pin(pin_t pin, uint8_t target_state) {
rtcnt_t start = chSysGetRealtimeCounterX();
rtcnt_t end = start + 5000;
while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end)) {
if (readPin(pin) == target_state) {
if (gpio_read_pin(pin) == target_state) {
break;
}
}


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

@ -41,5 +41,5 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
// Override core logic as we reuse SPLIT_HAND_PIN within matrix pins
bool is_keyboard_left(void) {
setPinInput(SPLIT_HAND_PIN);
return readPin(SPLIT_HAND_PIN);
return gpio_read_pin(SPLIT_HAND_PIN);
}

+ 5
- 5
keyboards/dp60/matrix.c View File

@ -129,11 +129,11 @@ static void init_rows(void)
static uint8_t read_rows(void)
{
return ((readPin(E6) ? 0 : (1 << 0)) |
(readPin(F6) ? 0 : (1 << 1)) |
(readPin(F7) ? 0 : (1 << 2)) |
(readPin(B7) ? 0 : (1 << 3)) |
(readPin(D4) ? 0 : (1 << 4)));
return ((gpio_read_pin(E6) ? 0 : (1 << 0)) |
(gpio_read_pin(F6) ? 0 : (1 << 1)) |
(gpio_read_pin(F7) ? 0 : (1 << 2)) |
(gpio_read_pin(B7) ? 0 : (1 << 3)) |
(gpio_read_pin(D4) ? 0 : (1 << 4)));
}
/*


+ 1
- 1
keyboards/durgod/k310/k310.c View File

@ -83,7 +83,7 @@ void keyboard_pre_init_kb(void) {
palSetPadCallback(PAL_PORT(HARDWARE_RESET_PIN), PAL_PAD(HARDWARE_RESET_PIN), hardware_reset_cb, NULL);
/* The interrupt is edge-triggered so check that it's not already pressed */
if (!readPin(HARDWARE_RESET_PIN)) {
if (!gpio_read_pin(HARDWARE_RESET_PIN)) {
bootloader_jump();
}
#endif


+ 1
- 1
keyboards/durgod/k320/k320.c View File

@ -83,7 +83,7 @@ void keyboard_pre_init_kb(void) {
palSetPadCallback(PAL_PORT(HARDWARE_RESET_PIN), PAL_PAD(HARDWARE_RESET_PIN), hardware_reset_cb, NULL);
/* The interrupt is edge-triggered so check that it's not already pressed */
if (!readPin(HARDWARE_RESET_PIN)) {
if (!gpio_read_pin(HARDWARE_RESET_PIN)) {
bootloader_jump();
}
#endif


+ 1
- 1
keyboards/evyd13/wasdat/matrix.c View File

@ -97,7 +97,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 1
- 1
keyboards/evyd13/wasdat_code/matrix.c View File

@ -100,7 +100,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 1
- 1
keyboards/ferris/0_1/matrix.c View File

@ -194,7 +194,7 @@ static matrix_row_t read_cols(uint8_t row) {
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);


+ 1
- 1
keyboards/ferris/0_2/matrix.c View File

@ -173,7 +173,7 @@ static matrix_row_t read_cols(uint8_t row) {
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);


+ 1
- 1
keyboards/geistmaschine/macropod/matrix.c View File

@ -78,7 +78,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
}
// Shift pin states by 1 to make room for the switch connected to the MCU, then OR them together and invert (as QMK uses inverted logic compared to the electrical levels)
matrix_row_t data = ~(pin_states << 1 | readPin(D2));
matrix_row_t data = ~(pin_states << 1 | gpio_read_pin(D2));
bool changed = current_matrix[0] != data;
current_matrix[0] = data;


+ 2
- 2
keyboards/gl516/a52gl/matrix.c View File

@ -83,7 +83,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -111,7 +111,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[tmp] |= (MATRIX_ROW_SHIFTER << current_col);


+ 2
- 2
keyboards/gl516/j73gl/matrix.c View File

@ -83,7 +83,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -111,7 +111,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[tmp] |= (MATRIX_ROW_SHIFTER << current_col);


+ 2
- 2
keyboards/gl516/n51gl/matrix.c View File

@ -83,7 +83,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -111,7 +111,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[tmp] |= (MATRIX_ROW_SHIFTER << current_col);


+ 1
- 1
keyboards/gmmk/numpad/matrix.c View File

@ -44,7 +44,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 2
- 2
keyboards/halfcliff/matrix.c View File

@ -86,7 +86,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -141,7 +141,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t current_row_value = last_row_value;
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_row_value |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 1
- 1
keyboards/handwired/lagrange/lagrange.c View File

@ -35,7 +35,7 @@ bool is_keyboard_master(void) {
static int8_t is_master = -1;
if (is_master < 0) {
while (readPin(SPI_SS_PIN)) {
while (gpio_read_pin(SPI_SS_PIN)) {
if (USB_Device_IsAddressSet()) {
is_master = 1;
return is_master;


+ 1
- 1
keyboards/handwired/owlet60/matrix.c View File

@ -173,7 +173,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Select the col pin to read (active low)
select_col_analog(col_index);
wait_us(30);
uint8_t pin_state = readPin(dat_pin);
uint8_t pin_state = gpio_read_pin(dat_pin);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);


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

@ -94,7 +94,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
current_row_value |= gpio_read_pin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
}
}
@ -145,7 +145,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
writePin(MATRIX_MUL_SELECT, col_sel[col_index]);
waitInputPinDelay();
# endif
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -178,7 +178,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
writePin(MATRIX_MUL_SELECT, col_sel[col_index]);
waitInputPinDelay();
# endif
while (readPin(col_pins[col_index]) == 0) {
while (gpio_read_pin(col_pins[col_index]) == 0) {
}
MATRIX_DEBUG_DELAY_END();
}
@ -197,7 +197,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
writePin(MATRIX_MUL_SELECT, col_sel[col_index]);
waitInputPinDelay();
# endif
state |= (readPin(col_pins[col_index]) == 0);
state |= (gpio_read_pin(col_pins[col_index]) == 0);
}
MATRIX_DEBUG_DELAY_END();
} while (state);
@ -251,7 +251,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t current_row_value = last_row_value;
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_row_value |= (MATRIX_ROW_SHIFTER << current_col);
key_pressed = true;


+ 3
- 3
keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c View File

@ -19,7 +19,7 @@
void keyboard_pre_init_sub(void) { setPinInputHigh(A0); }
void matrix_scan_sub_kb(void) {
if (!readPin(A0)) {
if (!gpio_read_pin(A0)) {
reset_keyboard();
}
}
@ -44,7 +44,7 @@ __attribute__((weak)) void bootmagic_scan(void) {
}
#endif
if (matrix_get_row(row) & (1 << col) || !readPin(A0)) {
if (matrix_get_row(row) & (1 << col) || !gpio_read_pin(A0)) {
eeconfig_disable();
bootloader_jump();
}
@ -55,7 +55,7 @@ __attribute__((weak)) void bootmagic_scan(void) {
bool usb_vbus_state(void) {
setPinInputLow(USB_VBUS_PIN);
wait_us(5);
return readPin(USB_VBUS_PIN);
return gpio_read_pin(USB_VBUS_PIN);
}
#endif


+ 1
- 1
keyboards/hazel/bad_wings/matrix.c View File

@ -117,7 +117,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
matrix_io_delay();
for (int r = 0; r < SHIFTREG_ROWS; r++) {
current_matrix[r] |= ((readPin(rowPinsSR[r]) ? 1 : 0) << c);
current_matrix[r] |= ((gpio_read_pin(rowPinsSR[r]) ? 1 : 0) << c);
}
}


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

@ -31,10 +31,10 @@ static uint32_t matrix_last_modified = 0;
static inline void key_strobe_high(void) { writePinLow(B6); }
static inline void key_strobe_low(void) { writePinHigh(B6); }
static inline bool key_state(void) { return readPin(D7); }
static inline bool key_state(void) { return gpio_read_pin(D7); }
static inline void key_prev_on(void) { writePinHigh(B7); }
static inline void key_prev_off(void) { writePinLow(B7); }
static inline bool key_power_state(void) { return !readPin(D6); }
static inline bool key_power_state(void) { return !gpio_read_pin(D6); }
static inline void suspend_power_down_longer(void) {
uint8_t times = 60;


+ 2
- 2
keyboards/hineybush/hbcp/matrix.c View File

@ -50,7 +50,7 @@ static matrix_row_t last_matrix[MATRIX_ROWS]; // raw values of last scan
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -82,7 +82,7 @@ static matrix_row_t last_matrix[MATRIX_ROWS]; // raw values of last scan
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
}


+ 1
- 1
keyboards/ingrained/matrix.c View File

@ -192,7 +192,7 @@ static matrix_row_t read_cols(uint8_t row) {
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);


+ 1
- 1
keyboards/jones/v03/matrix.c View File

@ -63,7 +63,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// skip reading when index equals (= pin itself)
if (col_index != current_row) {
// Check col pin pin_state
if (readPin(col_pins[col_index]) == 0) {
if (gpio_read_pin(col_pins[col_index]) == 0) {
// Pin LO, set col bit
current_matrix[current_row] |= (ROW_SHIFTER << col_index);
} else {


+ 1
- 1
keyboards/jones/v03_1/matrix.c View File

@ -63,7 +63,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// skip reading when index equals (= pin itself)
if (col_index != current_row) {
// Check col pin pin_state
if (readPin(col_pins[col_index]) == 0) {
if (gpio_read_pin(col_pins[col_index]) == 0) {
// Pin LO, set col bit
current_matrix[current_row] |= (ROW_SHIFTER << col_index);
} else {


+ 3
- 3
keyboards/joshajohnson/hub16/matrix.c View File

@ -67,7 +67,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -115,8 +115,8 @@ static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current
bool btn_2_rise = 0;
btn_1_array <<= 1;
btn_2_array <<= 1;
btn_1_array |= readPin(SWITCH_1);
btn_2_array |= readPin(SWITCH_2);
btn_1_array |= gpio_read_pin(SWITCH_1);
btn_2_array |= gpio_read_pin(SWITCH_2);
(btn_1_array == 0b01111111) ? (btn_1_rise = 1) : (btn_1_rise = 0);
(btn_2_array == 0b01111111) ? (btn_2_rise = 1) : (btn_2_rise = 0);


+ 1
- 1
keyboards/kagizaraya/chidori/board.c View File

@ -282,7 +282,7 @@ static bool board_read_cols_on_master_row(board_info_t* board, matrix_row_t curr
wait_us(30);
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
uint8_t pin_state = readPin(board->col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(board->col_pins[col_index]);
current_matrix[row] |= pin_state ? 0 : (1 << col_index);
}
board_unselect_master_row(board, board_row);


+ 2
- 2
keyboards/kakunpc/angel64/alpha/matrix.c View File

@ -169,7 +169,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -197,7 +197,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[tmp] |= (ROW_SHIFTER << current_col);


+ 2
- 2
keyboards/kakunpc/angel64/rev1/matrix.c View File

@ -169,7 +169,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -197,7 +197,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[tmp] |= (ROW_SHIFTER << current_col);


+ 2
- 2
keyboards/kakunpc/choc_taro/matrix.c View File

@ -88,7 +88,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -114,7 +114,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[tmp] |= (ROW_SHIFTER << current_col);
} else {


+ 2
- 2
keyboards/kakunpc/thedogkeyboard/matrix.c View File

@ -169,7 +169,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -197,7 +197,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[tmp] |= (ROW_SHIFTER << current_col);


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

@ -146,7 +146,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
// Check row pin state
// Use the otherwise unused row: 3, col: 0 for caps lock
if (row_index == 3 && current_col == 0) {
if (readPin(E2) == 0) {
if (gpio_read_pin(E2) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
} else {
@ -154,7 +154,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
}
} else {
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin HI, clear col bit
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
} else {


+ 2
- 2
keyboards/kbdmania/kmac_pad/matrix.c View File

@ -51,7 +51,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
if (current_col == 0) {
matrix_row_t last_row_value = current_matrix[0];
if (readPin(row_pins[0]) == 0) {
if (gpio_read_pin(row_pins[0]) == 0) {
// Pin LO, set col bit
current_matrix[0] |= (1 << current_col);
} else {
@ -69,7 +69,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
for (uint8_t row_index = 1; row_index < MATRIX_ROWS; row_index++) {
matrix_row_t last_row_value = current_matrix[row_index];
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin HI, clear col bit
current_matrix[row_index] &= ~(1 << current_col);
} else {


+ 1
- 1
keyboards/keychron/c2_pro/matrix.c View File

@ -61,7 +61,7 @@ static inline void setPinInput_high(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/q10/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/q12/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/q1v2/matrix.c View File

@ -54,7 +54,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/q3/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/q5/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/q6/matrix.c View File

@ -67,7 +67,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/q65/matrix.c View File

@ -60,7 +60,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/v1/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/v10/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/v3/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/v5/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/keychron/v6/matrix.c View File

@ -55,7 +55,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 2
- 2
keyboards/kinesis/nguyenvietyen/matrix.c View File

@ -10,10 +10,10 @@ static matrix_row_t read_row(uint8_t row) {
// keypad and program buttons
if (row == 12) {
return ~(readPin(B4) | (readPin(B5) << 1) | 0b11111100);
return ~(gpio_read_pin(B4) | (gpio_read_pin(B5) << 1) | 0b11111100);
}
return ~(readPin(B6) | readPin(B2) << 1 | readPin(B3) << 2 | readPin(B1) << 3 | readPin(F7) << 4 | readPin(F6) << 5 | readPin(F5) << 6 | readPin(F4) << 7);
return ~(gpio_read_pin(B6) | gpio_read_pin(B2) << 1 | gpio_read_pin(B3) << 2 | gpio_read_pin(B1) << 3 | gpio_read_pin(F7) << 4 | gpio_read_pin(F6) << 5 | gpio_read_pin(F5) << 6 | gpio_read_pin(F4) << 7);
}
static void unselect_rows(void) {


+ 7
- 7
keyboards/ktec/ergodone/matrix.c View File

@ -97,13 +97,13 @@ static void init_cols(void) {
static matrix_row_t read_cols(void) {
// clang-format off
return expander_read_row() |
(readPin(D3) ? 0 : (1<<6)) |
(readPin(D2) ? 0 : (1<<5)) |
(readPin(D4) ? 0 : (1<<4)) |
(readPin(C6) ? 0 : (1<<3)) |
(readPin(D7) ? 0 : (1<<2)) |
(readPin(E6) ? 0 : (1<<1)) |
(readPin(B4) ? 0 : (1<<0)) ;
(gpio_read_pin(D3) ? 0 : (1<<6)) |
(gpio_read_pin(D2) ? 0 : (1<<5)) |
(gpio_read_pin(D4) ? 0 : (1<<4)) |
(gpio_read_pin(C6) ? 0 : (1<<3)) |
(gpio_read_pin(D7) ? 0 : (1<<2)) |
(gpio_read_pin(E6) ? 0 : (1<<1)) |
(gpio_read_pin(B4) ? 0 : (1<<0)) ;
// clang-format on
}


+ 1
- 1
keyboards/lz/erghost/matrix.c View File

@ -306,7 +306,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


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

@ -133,7 +133,7 @@ void matrix_init_kb(void) {
}
void matrix_scan_kb(void) {
matrix_scan_user();
if (readPin(ENCODER_SWITCH)) {
if (gpio_read_pin(ENCODER_SWITCH)) {
if (encoder_pressed) { // release switch
encoder_pressed = 0;
encoder_press_combo += 1;


+ 1
- 1
keyboards/matrix/m12og/rev1/matrix.c View File

@ -58,7 +58,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t current_row_value = last_row_value;
// Check row pin state
if (readPin(row_pins[row_index]) != 0) {
if (gpio_read_pin(row_pins[row_index]) != 0) {
// Pin LO, set col bit
current_row_value |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 2
- 2
keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c View File

@ -53,7 +53,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
}
}
@ -322,7 +322,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 2
- 2
keyboards/mechlovin/infinity87/rev2/matrix.c View File

@ -53,7 +53,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
}
}
@ -347,7 +347,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 2
- 2
keyboards/mechlovin/infinity875/matrix.c View File

@ -53,7 +53,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
}
}
@ -347,7 +347,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 1
- 1
keyboards/mechlovin/olly/bb/matrix.c View File

@ -326,7 +326,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 3
- 3
keyboards/mechlovin/olly/jf/rev1/matrix.c View File

@ -53,7 +53,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
}
}
@ -97,7 +97,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -416,7 +416,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 2
- 2
keyboards/mechlovin/serratus/matrix.c View File

@ -53,7 +53,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
}
}
@ -347,7 +347,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {


+ 2
- 2
keyboards/mexsistor/ludmila/matrix.c View File

@ -67,7 +67,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@ -111,7 +111,7 @@ static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current
static uint8_t btn_1_array;
bool btn_1_pressed = 0;
btn_1_array <<= 1;
btn_1_array |= readPin(ENC_SW);
btn_1_array |= gpio_read_pin(ENC_SW);
(btn_1_array == 0b11111111) ? (btn_1_pressed = 1) : (btn_1_pressed = 0);
// Populate the matrix row with the state of the encoder


+ 2
- 2
keyboards/miiiw/blackio83/blackio83.c View File

@ -133,7 +133,7 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) {
if(timer_elapsed32(pmu_timer) > 3000) {
pmu_timer = timer_read32();
writePinLow(MWPROTO_WAKEUP_PIN);
if(readPin(MWPROTO_STATUS_PIN))
if(gpio_read_pin(MWPROTO_STATUS_PIN))
wait_us(500);
else
wait_us(1500);
@ -152,7 +152,7 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) {
if(restore_tick++ > 50) {
restore_tick = 0;
writePinLow(MWPROTO_WAKEUP_PIN);
if(readPin(MWPROTO_STATUS_PIN))
if(gpio_read_pin(MWPROTO_STATUS_PIN))
wait_us(500);
else
wait_us(1500);


+ 1
- 1
keyboards/miiiw/blackio83/matrix.c View File

@ -91,7 +91,7 @@ void matrix_power_down(void) {
static uint8_t read_rows(void) {
uint8_t row_value = 0;
for(uint8_t row = 0; row < MATRIX_ROWS; row++) {
row_value |= (readPin(row_pins[row]) << row);
row_value |= (gpio_read_pin(row_pins[row]) << row);
}
return row_value;
}


+ 1
- 1
keyboards/nullbitsco/nibble/matrix.c View File

@ -59,7 +59,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
{
matrix_row_t last_row_value = current_matrix[row_index];
if (!readPin(row_pins[row_index]))
if (!gpio_read_pin(row_pins[row_index]))
{
current_matrix[row_index] |= (COL_SHIFTER << current_col);
}


+ 2
- 2
keyboards/nullbitsco/snap/matrix.c View File

@ -74,7 +74,7 @@ static void read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
// Read each row sequentially
for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) {
if (readPin(row_pins[row_index]) == 0) {
if (gpio_read_pin(row_pins[row_index]) == 0) {
current_matrix[row_index] |= (COL_SHIFTER << current_col);
} else {
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
@ -85,7 +85,7 @@ static void read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
static void read_ext_pin(matrix_row_t current_matrix[]) {
// Read the state of the extended matrix pin
if (!isLeftHand) {
if (readPin(MATRIX_EXT_PIN_RIGHT) == 0) {
if (gpio_read_pin(MATRIX_EXT_PIN_RIGHT) == 0) {
current_matrix[EXT_PIN_ROW] |= (COL_SHIFTER << EXT_PIN_COL);
} else {
current_matrix[EXT_PIN_ROW] &= ~(COL_SHIFTER << EXT_PIN_COL);


+ 2
- 2
keyboards/om60/matrix.c View File

@ -91,7 +91,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -119,7 +119,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[tmp];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[tmp] |= (ROW_SHIFTER << current_col);


+ 2
- 2
keyboards/pica40/rev2/rev2.c View File

@ -11,7 +11,7 @@
// custom handler that returns encoder B pin status from slave side
void encoder_sync_slave_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) {
*(uint8_t *)out_data = readPin(ENCODER_PIN_B) ? 1 : 0;
*(uint8_t *)out_data = gpio_read_pin(ENCODER_PIN_B) ? 1 : 0;
}
void encoder_quadrature_init_pin(uint8_t index, bool pad_b) {}
@ -22,7 +22,7 @@ uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b) {
transaction_rpc_recv(ENCODER_SYNC, sizeof(data), &data);
return data;
}
return readPin(ENCODER_PIN_A) ? 1 : 0;
return gpio_read_pin(ENCODER_PIN_A) ? 1 : 0;
}
#endif // ENCODER_ENABLE


+ 1
- 1
keyboards/planck/rev6_drop/matrix.c View File

@ -51,7 +51,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
// read row data
for (int row = 0; row < MATRIX_ROWS; row++) {
data |= (readPin(matrix_row_pins[row]) << row);
data |= (gpio_read_pin(matrix_row_pins[row]) << row);
}
// unstrobe col


+ 2
- 2
keyboards/planck/rev7/matrix.c View File

@ -89,7 +89,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
// read row data
for (int row = 0; row < MATRIX_ROWS; row++) {
data |= (readPin(matrix_row_pins[row]) << row);
data |= (gpio_read_pin(matrix_row_pins[row]) << row);
}
// unstrobe col
@ -117,7 +117,7 @@ uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b) {
setPinInputHigh(pin);
writePinLow(matrix_row_pins[index]);
wait_us(10);
uint8_t ret = readPin(pin) ? 1 : 0;
uint8_t ret = gpio_read_pin(pin) ? 1 : 0;
setPinInputLow(matrix_row_pins[index]);
setPinInputLow(pin);
return ret;


+ 6
- 6
keyboards/qvex/lynepad/lynepad.c View File

@ -40,18 +40,18 @@ int16_t enc2RightPrev = 1;
void matrix_scan_kb(void) {
enc1CenterPrev = enc1Center;
enc1Center = readPin(PIN_TW_SW);
enc1Center = gpio_read_pin(PIN_TW_SW);
enc2CenterPrev = enc2Center;
enc2Center = readPin(PIN_RJ_SW);
enc2Center = gpio_read_pin(PIN_RJ_SW);
enc2UpPrev = enc2Up;
enc2Up = readPin(PIN_RJ_DIR_A);
enc2Up = gpio_read_pin(PIN_RJ_DIR_A);
enc2DownPrev = enc2Down;
enc2Down = readPin(PIN_RJ_DIR_C);
enc2Down = gpio_read_pin(PIN_RJ_DIR_C);
enc2LeftPrev = enc2Left;
enc2Left = readPin(PIN_RJ_DIR_B);
enc2Left = gpio_read_pin(PIN_RJ_DIR_B);
enc2RightPrev = enc2Right;
enc2Right = readPin(PIN_RJ_DIR_D);
enc2Right = gpio_read_pin(PIN_RJ_DIR_D);
// Ensure any user customizations are called (for some reason this wasn't happening by default)
matrix_scan_user();


+ 7
- 7
keyboards/qvex/lynepad2/matrix.c View File

@ -67,7 +67,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
wait_us(30);
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
}
@ -83,16 +83,16 @@ static bool read_encoder_switches(matrix_row_t current_matrix[]) {
current_matrix[3] = 0;
current_matrix[4] = 0;
current_matrix[4] |= !readPin(PIN_TC) ? (1 << 1) : 0;
current_matrix[4] |= !gpio_read_pin(PIN_TC) ? (1 << 1) : 0;
if (!readPin(PIN_JC)) {
if (!readPin(PIN_JU)) {
if (!gpio_read_pin(PIN_JC)) {
if (!gpio_read_pin(PIN_JU)) {
current_matrix[3] |= (1 << 0);
} else if (!readPin(PIN_JD)) {
} else if (!gpio_read_pin(PIN_JD)) {
current_matrix[3] |= (1 << 1);
} else if (!readPin(PIN_JL)) {
} else if (!gpio_read_pin(PIN_JL)) {
current_matrix[3] |= (1 << 2);
} else if (!readPin(PIN_JR)) {
} else if (!gpio_read_pin(PIN_JR)) {
current_matrix[3] |= (1 << 3);
} else {
current_matrix[4] |= (1 << 0);


+ 2
- 2
keyboards/rate/pistachio_pro/matrix.c View File

@ -83,7 +83,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS / 2; col_index++) {
// Check row pin state
if (readPin(col_pins[col_index])) {
if (gpio_read_pin(col_pins[col_index])) {
// Pin HI, clear col bit
current_matrix[current_row] &= ~(MATRIX_ROW_SHIFTER << col_index);
} else {
@ -111,7 +111,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index])) {
if (gpio_read_pin(row_pins[row_index])) {
// Pin HI, clear col bit
current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << ( current_col + MATRIX_COLS/2));
} else {


+ 3
- 3
keyboards/redscarf_iiplus/verb/matrix.c View File

@ -130,7 +130,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (ROW_SHIFTER << col_index);
}
}
@ -241,7 +241,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -296,7 +296,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[row_index] |= (ROW_SHIFTER << current_col);


+ 3
- 3
keyboards/redscarf_iiplus/verc/matrix.c View File

@ -130,7 +130,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (ROW_SHIFTER << col_index);
}
}
@ -241,7 +241,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -296,7 +296,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[row_index] |= (ROW_SHIFTER << current_col);


+ 3
- 3
keyboards/redscarf_iiplus/verd/matrix.c View File

@ -130,7 +130,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++) {
pin_t pin = direct_pins[current_row][col_index];
if (pin != NO_PIN) {
current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index);
current_matrix[current_row] |= gpio_read_pin(pin) ? 0 : (ROW_SHIFTER << col_index);
}
}
@ -241,7 +241,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
@ -296,7 +296,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if (readPin(row_pins[row_index]) == 0)
if (gpio_read_pin(row_pins[row_index]) == 0)
{
// Pin LO, set col bit
current_matrix[row_index] |= (ROW_SHIFTER << current_col);


+ 6
- 6
keyboards/ryanskidmore/rskeys100/matrix.c View File

@ -65,12 +65,12 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
}
static uint8_t read_rows(void) {
return (readPin(ROW_F) << 5)
| (readPin(ROW_E) << 4)
| (readPin(ROW_D) << 3)
| (readPin(ROW_C) << 2)
| (readPin(ROW_B) << 1)
| (readPin(ROW_A) );
return (gpio_read_pin(ROW_F) << 5)
| (gpio_read_pin(ROW_E) << 4)
| (gpio_read_pin(ROW_D) << 3)
| (gpio_read_pin(ROW_C) << 2)
| (gpio_read_pin(ROW_B) << 1)
| (gpio_read_pin(ROW_A) );
}
static void select_col(uint8_t col) {


+ 5
- 5
keyboards/snes_macropad/matrix.c View File

@ -70,10 +70,10 @@ static matrix_row_t readRow(size_t row, int setupDelay) {
// read the column data
const matrix_row_t ret =
(readPin(KBD_COL0) ? 0 : 1 << 0)
| (readPin(KBD_COL1) ? 0 : 1 << 1)
| (readPin(KBD_COL2) ? 0 : 1 << 2)
| (readPin(KBD_COL3) ? 0 : 1 << 3);
(gpio_read_pin(KBD_COL0) ? 0 : 1 << 0)
| (gpio_read_pin(KBD_COL1) ? 0 : 1 << 1)
| (gpio_read_pin(KBD_COL2) ? 0 : 1 << 2)
| (gpio_read_pin(KBD_COL3) ? 0 : 1 << 3);
// deselect the row
setPinOutput(pin);
@ -111,7 +111,7 @@ static void readSnesController(matrix_row_t current_matrix[]) {
// Shift accumulated data and read data pin
controller <<= 1;
controller |= readPin(SNES_D0) ? 0 : 1;
controller |= gpio_read_pin(SNES_D0) ? 0 : 1;
// todo: maybe read D1 and IO here too
// Shift next bit in


+ 1
- 1
keyboards/splitkb/aurora/helix/rev1/rev1.c View File

@ -25,7 +25,7 @@ static enum { UNKNOWN, LEFT, RIGHT } hand_side = UNKNOWN;
#if defined(SPLIT_HAND_PIN)
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
setPinInput(SPLIT_HAND_PIN);
hand_side = readPin(SPLIT_HAND_PIN) ? LEFT : RIGHT;
hand_side = gpio_read_pin(SPLIT_HAND_PIN) ? LEFT : RIGHT;
return (hand_side == LEFT);
#endif
hand_side = is_keyboard_master() ? LEFT : RIGHT;


+ 1
- 1
keyboards/sthlmkb/lagom/matrix.c View File

@ -59,7 +59,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
{
matrix_row_t last_row_value = current_matrix[row_index];
if (!readPin(row_pins[row_index]))
if (!gpio_read_pin(row_pins[row_index]))
{
current_matrix[row_index] |= (COL_SHIFTER << current_col);
}


+ 1
- 1
keyboards/torn/matrix.c View File

@ -60,7 +60,7 @@ static matrix_row_t read_cols(void) {
// For each col...
for (uint8_t col_index = 0; col_index < SPLIT_MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);


+ 1
- 1
keyboards/touchpad/matrix.c View File

@ -207,7 +207,7 @@ void touchClearCurrentDetections(void) {
//Check interrupt pin
uint8_t isTouchChangeDetected(void) {
return !readPin(D2);
return !gpio_read_pin(D2);
}
uint8_t matrix_scan(void) {


+ 1
- 1
keyboards/tzarc/djinn/djinn_portscan_matrix.c View File

@ -19,7 +19,7 @@ void matrix_wait_for_pin(pin_t pin, uint8_t target_state) {
rtcnt_t start = chSysGetRealtimeCounterX();
rtcnt_t end = start + 5000;
while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end)) {
if (readPin(pin) == target_state) {
if (gpio_read_pin(pin) == target_state) {
break;
}
}


+ 1
- 1
keyboards/tzarc/ghoul/ghoul.c View File

@ -33,7 +33,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
spi_stop();
// Read from the encoder pushbutton
temp_matrix[5] = readPin(ENCODER_PUSHBUTTON_PIN) ? 1 : 0;
temp_matrix[5] = gpio_read_pin(ENCODER_PUSHBUTTON_PIN) ? 1 : 0;
// Check if we've changed, return the last-read data
bool changed = memcmp(current_matrix, temp_matrix, sizeof(temp_matrix)) != 0;


+ 1
- 1
keyboards/viktus/sp111/matrix.c View File

@ -64,7 +64,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);


+ 1
- 1
keyboards/vitamins_included/rev2/rev2.c View File

@ -8,7 +8,7 @@ bool is_keyboard_left(void) {
#elif defined(SPLIT_HAND_PIN)
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
setPinInputHigh(SPLIT_HAND_PIN);
bool x = !readPin(SPLIT_HAND_PIN);
bool x = !gpio_read_pin(SPLIT_HAND_PIN);
setPinInput(SPLIT_HAND_PIN);
return x;
#elif defined(EE_HANDS)


+ 1
- 1
keyboards/work_louder/micro/matrix.c View File

@ -42,7 +42,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
static inline uint8_t readMatrixPin(pin_t pin) {
if (pin != NO_PIN) {
return readPin(pin);
return gpio_read_pin(pin);
} else {
return 1;
}


+ 1
- 1
keyboards/ydkb/grape/matrix.c View File

@ -63,7 +63,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)
uint8_t pin_state = readPin(col_pins[col_index]);
uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (row_shifter << col_index);


+ 1
- 1
keyboards/yiancardesigns/barleycorn/matrix.c View File

@ -113,7 +113,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
pin_state = port_expander_col_buffer[1] & (1 << 1);
break;
default :
pin_state = readPin(col_pins[col_index]);
pin_state = gpio_read_pin(col_pins[col_index]);
}
// Populate the matrix row with the state of the col pin


+ 1
- 1
keyboards/yiancardesigns/gingham/matrix.c View File

@ -92,7 +92,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
pin_state = pin_state & (1 << 1);
break;
default :
pin_state = readPin(col_pins[col_index]);
pin_state = gpio_read_pin(col_pins[col_index]);
}
// Populate the matrix row with the state of the col pin


+ 1
- 1
keyboards/yiancardesigns/seigaiha/matrix.c View File

@ -98,7 +98,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
pin_state = port_expander_col_buffer & (1 << 4);
break;
default :
pin_state = readPin(col_pins[col_index]);
pin_state = gpio_read_pin(col_pins[col_index]);
}
// Populate the matrix row with the state of the col pin


+ 7
- 7
keyboards/zsa/moonlander/matrix.c View File

@ -170,13 +170,13 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
}
// read col data
data = (
(readPin(A0) << 0 ) |
(readPin(A1) << 1 ) |
(readPin(A2) << 2 ) |
(readPin(A3) << 3 ) |
(readPin(A6) << 4 ) |
(readPin(A7) << 5 ) |
(readPin(B0) << 6 )
(gpio_read_pin(A0) << 0 ) |
(gpio_read_pin(A1) << 1 ) |
(gpio_read_pin(A2) << 2 ) |
(gpio_read_pin(A3) << 3 ) |
(gpio_read_pin(A6) << 4 ) |
(gpio_read_pin(A7) << 5 ) |
(gpio_read_pin(B0) << 6 )
);
// unstrobe row
switch (row) {


Loading…
Cancel
Save