summaryrefslogtreecommitdiff
path: root/platforms/chibios/drivers/ws2812_pwm.c
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-11-25 19:35:06 +0000
committerGitHub <noreply@github.com>2021-11-25 19:35:06 +0000
commit5e9c29da0df045b03ada9278c34f37b22349a6f7 (patch)
tree3dbe67afa346513de1132e23c636b5ad01bc3550 /platforms/chibios/drivers/ws2812_pwm.c
parent3d0062071133ad76504ede49a66063115c4a06c5 (diff)
Tidy up adjustable ws2812 timing (#15299)
Diffstat (limited to 'platforms/chibios/drivers/ws2812_pwm.c')
-rw-r--r--platforms/chibios/drivers/ws2812_pwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c
index c17b9cd4e5..19ea3cfe8a 100644
--- a/platforms/chibios/drivers/ws2812_pwm.c
+++ b/platforms/chibios/drivers/ws2812_pwm.c
@@ -71,7 +71,7 @@
* Calculate the number of zeroes to add at the end assuming 1.25 uS/bit:
*/
#define WS2812_COLOR_BITS (WS2812_CHANNELS * 8)
-#define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / 1250)
+#define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / WS2812_TIMING)
#define WS2812_COLOR_BIT_N (RGBLED_NUM * WS2812_COLOR_BITS) /**< Number of data bits */
#define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */