summaryrefslogtreecommitdiff
path: root/quantum/matrix.c
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2024-02-18 17:08:27 +1100
committerGitHub <noreply@github.com>2024-02-18 17:08:27 +1100
commit2d1aed78a67b3d2b002cc739ef087963b05b76b8 (patch)
treeea681d02e547332cffa6b7aec6c16ef37ad70ee3 /quantum/matrix.c
parent6810aaf0130113e267e20fb506d874cc858f5f67 (diff)
Update GPIO macro usages in core (#23093)
Diffstat (limited to 'quantum/matrix.c')
-rw-r--r--quantum/matrix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c
index f087a215d4..d4586efac2 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -78,27 +78,27 @@ __attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[]
78 78
79static inline void setPinOutput_writeLow(pin_t pin) { 79static inline void setPinOutput_writeLow(pin_t pin) {
80 ATOMIC_BLOCK_FORCEON { 80 ATOMIC_BLOCK_FORCEON {
81 setPinOutput(pin); 81 gpio_set_pin_output(pin);
82 writePinLow(pin); 82 gpio_write_pin_low(pin);
83 } 83 }
84} 84}
85 85
86static inline void setPinOutput_writeHigh(pin_t pin) { 86static inline void setPinOutput_writeHigh(pin_t pin) {
87 ATOMIC_BLOCK_FORCEON { 87 ATOMIC_BLOCK_FORCEON {
88 setPinOutput(pin); 88 gpio_set_pin_output(pin);
89 writePinHigh(pin); 89 gpio_write_pin_high(pin);
90 } 90 }
91} 91}
92 92
93static inline void setPinInputHigh_atomic(pin_t pin) { 93static inline void setPinInputHigh_atomic(pin_t pin) {
94 ATOMIC_BLOCK_FORCEON { 94 ATOMIC_BLOCK_FORCEON {
95 setPinInputHigh(pin); 95 gpio_set_pin_input_high(pin);
96 } 96 }
97} 97}
98 98
99static inline uint8_t readMatrixPin(pin_t pin) { 99static inline uint8_t readMatrixPin(pin_t pin) {
100 if (pin != NO_PIN) { 100 if (pin != NO_PIN) {
101 return (readPin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1; 101 return (gpio_read_pin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1;
102 } else { 102 } else {
103 return 1; 103 return 1;
104 } 104 }
@@ -113,7 +113,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
113 for (int col = 0; col < MATRIX_COLS; col++) { 113 for (int col = 0; col < MATRIX_COLS; col++) {
114 pin_t pin = direct_pins[row][col]; 114 pin_t pin = direct_pins[row][col];
115 if (pin != NO_PIN) { 115 if (pin != NO_PIN) {
116 setPinInputHigh(pin); 116 gpio_set_pin_input_high(pin);
117 } 117 }
118 } 118 }
119 } 119 }