diff options
Diffstat (limited to 'keyboards/halfcliff/matrix.c')
-rw-r--r-- | keyboards/halfcliff/matrix.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/keyboards/halfcliff/matrix.c b/keyboards/halfcliff/matrix.c index fd18fd27bd..ad3ad6ba09 100644 --- a/keyboards/halfcliff/matrix.c +++ b/keyboards/halfcliff/matrix.c @@ -14,15 +14,12 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdint.h> -#include <stdbool.h> -#include "util.h" #include "matrix.h" -#include "debounce.h" -#include "quantum.h" +#include "atomic_util.h" #include "split_util.h" -#include "config.h" #include "transport.h" +#include "debounce.h" +#include "wait.h" #define ERROR_DISCONNECT_COUNT 5 @@ -55,13 +52,13 @@ void matrix_print(void) {} static inline void setPinOutput_writeLow(pin_t pin) { ATOMIC_BLOCK_FORCEON { - setPinOutput(pin); - writePinLow(pin); + gpio_set_pin_output(pin); + gpio_write_pin_low(pin); } } static inline void setPinInputHigh_atomic(pin_t pin) { - ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); } + ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } } // matrix code @@ -86,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; 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 +138,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 { |