neopixel: Make sure there is a minimum low duration after a long pulse
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
9e8c4770ed
commit
c5e7985740
|
@ -53,10 +53,7 @@ neopixel_get_time(void)
|
||||||
return TCNT1;
|
return TCNT1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
#define neopixel_delay(start, ticks) (void)(ticks)
|
||||||
neopixel_delay(neopixel_time_t start, neopixel_time_t ticks)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -139,6 +136,8 @@ send_data(struct neopixel_s *n, uint8_t *data, uint_fast8_t data_len)
|
||||||
irq_disable();
|
irq_disable();
|
||||||
gpio_out_toggle_noirq(pin);
|
gpio_out_toggle_noirq(pin);
|
||||||
irq_enable();
|
irq_enable();
|
||||||
|
|
||||||
|
neopixel_delay(neopixel_get_time(), PULSE_SHORT_TICKS);
|
||||||
} else {
|
} else {
|
||||||
// Short pulse
|
// Short pulse
|
||||||
neopixel_delay(last_start, BIT_MIN_TICKS);
|
neopixel_delay(last_start, BIT_MIN_TICKS);
|
||||||
|
|
Loading…
Reference in New Issue