change neopixel color

This commit is contained in:
hathach 2018-11-24 01:27:37 +07:00
parent 5e0195ddb4
commit f30199f503
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581
4 changed files with 1696 additions and 1688 deletions

View File

@ -87,7 +87,7 @@ void board_init(void)
extern void neopixel_init(void); extern void neopixel_init(void);
neopixel_init(); neopixel_init();
uint8_t grb[3] = { 0, 255, 0 }; uint8_t grb[3] = { 0, 32, 0 };
neopixel_write(grb); neopixel_write(grb);
#endif #endif
@ -256,6 +256,11 @@ void neopixel_init(void)
void neopixel_teardown(void) void neopixel_teardown(void)
{ {
uint8_t grb[3] = { 0, 0, 0 };
neopixel_write(grb);
NRFX_DELAY_US(100);
pwm_teardown(NRF_PWM2); pwm_teardown(NRF_PWM2);
} }

View File

@ -158,7 +158,7 @@ void usb_teardown(void)
void tud_mount_cb(void) void tud_mount_cb(void)
{ {
#ifdef LED_NEOPIXEL #ifdef LED_NEOPIXEL
uint8_t grb[3] = { 255, 0, 0 }; uint8_t grb[3] = { 32, 0, 0 };
neopixel_write(grb); neopixel_write(grb);
#endif #endif
} }
@ -166,7 +166,7 @@ void tud_mount_cb(void)
void tud_umount_cb(void) void tud_umount_cb(void)
{ {
#ifdef LED_NEOPIXEL #ifdef LED_NEOPIXEL
uint8_t grb[3] = { 0, 255, 0 }; uint8_t grb[3] = { 0, 32, 0 };
neopixel_write(grb); neopixel_write(grb);
#endif #endif
} }