diff options
Diffstat (limited to 'keyboards/geistmaschine/macropod/matrix.c')
-rw-r--r-- | keyboards/geistmaschine/macropod/matrix.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/keyboards/geistmaschine/macropod/matrix.c b/keyboards/geistmaschine/macropod/matrix.c index 60b1dafe63..5cd35b47d4 100644 --- a/keyboards/geistmaschine/macropod/matrix.c +++ b/keyboards/geistmaschine/macropod/matrix.c @@ -14,8 +14,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "matrix.h" #include "pca9555.h" -#include "quantum.h" +#include "timer.h" // PCA9555 i2c address, 0x20: A0 = 0, A1 = 0, A2 = 0 #define IC1 0x20 @@ -37,7 +38,7 @@ void pca9555_setup(void) { void matrix_init_custom(void) { // Encoder pushbutton on the MCU is connected to PD2 - setPinInputHigh(D2); + gpio_set_pin_input_high(D2); pca9555_setup(); } @@ -55,7 +56,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { pca9555_setup(); } // Read the entire port into this byte, 1 = not pressed, 0 = pressed - bool ret = pca9555_readPins(IC1, PCA9555_PORT0, &pin_states); + bool ret = pca9555_read_pins(IC1, PCA9555_PORT0, &pin_states); // Update state if (ret) { @@ -78,7 +79,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; |