diff options
author | Nick Brassel <[email protected]> | 2024-05-28 14:39:23 +1000 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2024-05-28 14:39:23 +1000 |
commit | f76cc320fd9f3365a80cc0d8af2990bc28d76bde (patch) | |
tree | 3c5330bbc9ab254424ac57335510de341b4ada11 /drivers/led/apa102.c | |
parent | 7620c64b99dc5bec480bfaa2708cb3fae709e2b3 (diff) | |
parent | 465ab5a20643722c9b712c6b6924472b7345dd64 (diff) | |
download | qmk_firmware-f76cc320fd9f3365a80cc0d8af2990bc28d76bde.tar.gz qmk_firmware-f76cc320fd9f3365a80cc0d8af2990bc28d76bde.zip |
Merge branch 'develop'0.25.0
Diffstat (limited to 'drivers/led/apa102.c')
-rw-r--r-- | drivers/led/apa102.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index d6d4327495..b171b07b12 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -67,7 +67,9 @@ static void apa102_send_byte(uint8_t byte) { } static void apa102_start_frame(void) { - apa102_init(); + gpio_write_pin_low(APA102_DI_PIN); + gpio_write_pin_low(APA102_CI_PIN); + for (uint16_t i = 0; i < 4; i++) { apa102_send_byte(0); } @@ -103,7 +105,8 @@ static void apa102_end_frame(uint16_t num_leds) { apa102_send_byte(0); } - apa102_init(); + gpio_write_pin_low(APA102_DI_PIN); + gpio_write_pin_low(APA102_CI_PIN); } static void apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness) { @@ -116,9 +119,6 @@ static void apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t void apa102_init(void) { gpio_set_pin_output(APA102_DI_PIN); gpio_set_pin_output(APA102_CI_PIN); - - gpio_write_pin_low(APA102_DI_PIN); - gpio_write_pin_low(APA102_CI_PIN); } void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) { |