summaryrefslogtreecommitdiffstats
path: root/platforms/chibios/drivers/ws2812.c
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-09-14 03:18:36 +0100
committerGitHub <noreply@github.com>2021-09-14 12:18:36 +1000
commit0ca4a56a0449d17a497ba610d4cee41c914ff50e (patch)
tree5e10d1ced8cf84e673f5e3ae88457de32d4943dd /platforms/chibios/drivers/ws2812.c
parent232bc23a89874d1a2e028a1414dd34cf0339f8d2 (diff)
Refactor use of STM32_SYSCLK (#14430)
* Refactor use of STM32_SYSCLK * clang
Diffstat (limited to 'platforms/chibios/drivers/ws2812.c')
-rw-r--r--platforms/chibios/drivers/ws2812.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platforms/chibios/drivers/ws2812.c b/platforms/chibios/drivers/ws2812.c
index 0d12e2fb79..ffcdcff242 100644
--- a/platforms/chibios/drivers/ws2812.c
+++ b/platforms/chibios/drivers/ws2812.c
@@ -23,7 +23,7 @@
#endif
#define NUMBER_NOPS 6
-#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE)
+#define CYCLES_PER_SEC (CPU_CLOCK / NUMBER_NOPS * NOP_FUDGE)
#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives
#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)