From dddf48651a4a9389d61412131acfe2f4a27f133c Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Fri, 5 Aug 2022 09:29:24 -0400 Subject: [PATCH] Fix some errors with entering and exiting the sk9822 idle state --- sk9822/sk9822.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sk9822/sk9822.c b/sk9822/sk9822.c index f7d0c83..2d34a72 100644 --- a/sk9822/sk9822.c +++ b/sk9822/sk9822.c @@ -22,6 +22,7 @@ void send_byte(dio_t data_pin, dio_t clock_pin, uint8_t byte) { } void send_start(dio_t data_pin, dio_t clock_pin) { + dio_set(&clock_pin, 0); send_byte(data_pin, clock_pin, 0); send_byte(data_pin, clock_pin, 0); send_byte(data_pin, clock_pin, 0); @@ -33,6 +34,7 @@ void send_term(dio_t data_pin, dio_t clock_pin) { send_byte(data_pin, clock_pin, 0xff); send_byte(data_pin, clock_pin, 0xff); send_byte(data_pin, clock_pin, 0xff); + dio_set(&clock_pin, 1); } void sk9822_init(sk9822_t *lights) {