From 6c2960b536daa5426881a97d92f16b85f2052b4f Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 24 Sep 2020 13:10:37 +0200 Subject: [PATCH] Fix WS2812 timmings --- extdrv/ws2812.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extdrv/ws2812.c b/extdrv/ws2812.c index a9c5b0b..615031f 100644 --- a/extdrv/ws2812.c +++ b/extdrv/ws2812.c @@ -78,8 +78,6 @@ static void ws2812_bit_sender(struct ws2812_conf* ws2812) nop(); nop(); nop(); - nop(); - nop(); /* "low" time : 800ns */ gpio_port->clear = gpio_bit; nop(); @@ -89,9 +87,8 @@ static void ws2812_bit_sender(struct ws2812_conf* ws2812) nop(); nop(); nop(); - nop(); } else { - /* "high" time : 700ns */ + /* "high" time : 800ns */ gpio_port->set = gpio_bit; nop(); nop(); @@ -109,10 +106,11 @@ static void ws2812_bit_sender(struct ws2812_conf* ws2812) nop(); nop(); nop(); + nop(); + nop(); /* "low" time : 600ns */ gpio_port->clear = gpio_bit; nop(); - nop(); } /* Move to the next bit */ -- 2.43.0