diff options
| author | Ryan <fauxpark@gmail.com> | 2020-04-30 16:24:47 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-30 16:24:47 +1000 |
| commit | 16a15c1cfcbfd0feb2c2cf1383676747e2f97d73 (patch) | |
| tree | aaa3c9f5a23207861d05c37ed4860af8efd40f85 /drivers | |
| parent | 37a4b53c4f51b66992e687b5012c83df9cc6b138 (diff) | |
| download | qmk_firmware-16a15c1cfcbfd0feb2c2cf1383676747e2f97d73.tar.gz qmk_firmware-16a15c1cfcbfd0feb2c2cf1383676747e2f97d73.zip | |
QMK-ify some GPIO macros (#8315)
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/avr/apa102.c | 8 | ||||
| -rw-r--r-- | drivers/avr/ssd1306.h | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/avr/apa102.c b/drivers/avr/apa102.c index f4d97a158..b174b39b8 100644 --- a/drivers/avr/apa102.c +++ b/drivers/avr/apa102.c | |||
| @@ -30,8 +30,8 @@ | |||
| 30 | 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)); } | 30 | 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)); } |
| 31 | 31 | ||
| 32 | void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) { | 32 | void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) { |
| 33 | pinMode(RGB_DI_PIN, PinDirectionOutput); | 33 | setPinOutput(RGB_DI_PIN); |
| 34 | pinMode(RGB_CLK_PIN, PinDirectionOutput); | 34 | setPinOutput(RGB_CLK_PIN); |
| 35 | 35 | ||
| 36 | apa102_send_array((uint8_t *)ledarray, leds) | 36 | apa102_send_array((uint8_t *)ledarray, leds) |
| 37 | } | 37 | } |
| @@ -90,7 +90,7 @@ void apa102_end_frame(uint16_t leds) { | |||
| 90 | void apa102_send_byte(uint8_t byte) { | 90 | void apa102_send_byte(uint8_t byte) { |
| 91 | uint8_t i; | 91 | uint8_t i; |
| 92 | for (i = 0; i < 8; i++) { | 92 | for (i = 0; i < 8; i++) { |
| 93 | digitalWrite(RGB_DI_PIN, !!(byte & (1 << (7-i))); | 93 | writePin(RGB_DI_PIN, !!(byte & (1 << (7 - i)))); |
| 94 | digitalWrite(RGB_CLK_PIN, PinLevelHigh); | 94 | writePinHigh(RGB_CLK_PIN); |
| 95 | } | 95 | } |
| 96 | } | 96 | } |
diff --git a/drivers/avr/ssd1306.h b/drivers/avr/ssd1306.h index 825b0d7d5..9669d1b7e 100644 --- a/drivers/avr/ssd1306.h +++ b/drivers/avr/ssd1306.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #include <stdbool.h> | 4 | #include <stdbool.h> |
| 5 | #include <stdio.h> | 5 | #include <stdio.h> |
| 6 | #include "pincontrol.h" | ||
| 7 | #include "config.h" | 6 | #include "config.h" |
| 8 | 7 | ||
| 9 | enum ssd1306_cmds { | 8 | enum ssd1306_cmds { |
