aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/neopixel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/neopixel.c b/src/neopixel.c
index 4e171658..fe3f724f 100644
--- a/src/neopixel.c
+++ b/src/neopixel.c
@@ -34,7 +34,7 @@ typedef unsigned int neopixel_time_t;
static __always_inline neopixel_time_t
nsecs_to_ticks(uint32_t ns)
{
- return timer_from_us(ns * 1000) / 1000000;
+ return DIV_ROUND_UP(timer_from_us(ns * 1000), 1000000);
}
static inline int