fix neopixel didn't turn off after dfu cdc

This commit is contained in:
hathach 2018-12-21 14:48:04 +07:00
parent e66ee2af6d
commit 25f6d395bc
1 changed files with 3 additions and 2 deletions

View File

@ -347,9 +347,10 @@ void neopixel_init(void)
void neopixel_teardown(void)
{
uint8_t grb[3] = { 0, 0, 0 };
neopixel_write(grb);
NRFX_DELAY_US(100);
NRFX_DELAY_US(100); // wait for previous write is complete
neopixel_write(grb);
NRFX_DELAY_US(100); // wait for this write
pwm_teardown(NRF_PWM2);
}