diff options
author | Ryan <fauxpark@gmail.com> | 2020-04-30 16:24:47 +1000 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-06-12 17:00:27 +0900 |
commit | 1aa5d2d6d090516d3653e0c875a8aace6461e0b4 (patch) | |
tree | 8f72131a2cd5a8d2068df604579aa966eaa810f6 /drivers/avr/apa102.c | |
parent | f0e97ba47247b84ddd7d6d0698ab801d77b2afba (diff) |
QMK-ify some GPIO macros (#8315)
Diffstat (limited to 'drivers/avr/apa102.c')
-rw-r--r-- | drivers/avr/apa102.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/avr/apa102.c b/drivers/avr/apa102.c index f4d97a1589..b174b39b8f 100644 --- a/drivers/avr/apa102.c +++ b/drivers/avr/apa102.c @@ -30,8 +30,8 @@ void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds) { apa102_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); } void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) { - pinMode(RGB_DI_PIN, PinDirectionOutput); - pinMode(RGB_CLK_PIN, PinDirectionOutput); + setPinOutput(RGB_DI_PIN); + setPinOutput(RGB_CLK_PIN); apa102_send_array((uint8_t *)ledarray, leds) } @@ -90,7 +90,7 @@ void apa102_end_frame(uint16_t leds) { void apa102_send_byte(uint8_t byte) { uint8_t i; for (i = 0; i < 8; i++) { - digitalWrite(RGB_DI_PIN, !!(byte & (1 << (7-i))); - digitalWrite(RGB_CLK_PIN, PinLevelHigh); + writePin(RGB_DI_PIN, !!(byte & (1 << (7 - i)))); + writePinHigh(RGB_CLK_PIN); } } |