diff options
author | Ryan <[email protected]> | 2024-05-02 19:48:49 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-02 10:48:49 +0100 |
commit | 61c7c1f74cc5365501a3038181df551df11f719e (patch) | |
tree | 67b134bfd3ba45660765f5c2c46b8d3f535b5b69 /keyboards/keyboardio | |
parent | 7220715dd1619dfb073db78cfc23998a67994655 (diff) | |
download | qmk_firmware-61c7c1f74cc5365501a3038181df551df11f719e.tar.gz qmk_firmware-61c7c1f74cc5365501a3038181df551df11f719e.zip |
Convert some AVR GPIO operations to macros (#23424)
Diffstat (limited to 'keyboards/keyboardio')
-rw-r--r-- | keyboards/keyboardio/model01/leds.c | 7 | ||||
-rw-r--r-- | keyboards/keyboardio/model01/matrix.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/keyboards/keyboardio/model01/leds.c b/keyboards/keyboardio/model01/leds.c index 656e176bfa..c9a037906a 100644 --- a/keyboards/keyboardio/model01/leds.c +++ b/keyboards/keyboardio/model01/leds.c @@ -65,12 +65,11 @@ static void set_color_all(uint8_t r, uint8_t g, uint8_t b) { static void init(void) { // Enable high current pathway to LEDs - this does violate the USB spec though! (1.6 amps...) - DDRE |= _BV(6); - PORTE &= ~_BV(6); + gpio_set_pin_output(E6); + gpio_write_pin_low(E6); // Overcurrent check input - DDRB &= ~_BV(4); - PORTB &= ~_BV(4); + gpio_set_pin_input(B4); } static void flush(void) { diff --git a/keyboards/keyboardio/model01/matrix.c b/keyboards/keyboardio/model01/matrix.c index 20359ca971..72948fc0b7 100644 --- a/keyboards/keyboardio/model01/matrix.c +++ b/keyboards/keyboardio/model01/matrix.c @@ -69,8 +69,8 @@ static int i2c_set_keyscan_interval(int hand, int delay) { void matrix_init(void) { /* Ensure scanner power is on - else right hand will not work */ - DDRC |= _BV(7); - PORTC |= _BV(7); + gpio_set_pin_output(C7); + gpio_write_pin_high(C7); i2c_init(); i2c_set_keyscan_interval(LEFT, 2); |