|
|
@ -97,7 +97,6 @@ static void BoardLight_effect_tmr_handler(void* p_context) { // |
|
|
|
|
|
|
|
void BoardLight_Init() { |
|
|
|
ZERROR_CHECK(app_timer_create(&m_green_light_effect_tmr, APP_TIMER_MODE_REPEATED, BoardLight_effect_tmr_handler)); |
|
|
|
APP_ERROR_CHECK(nrfx_pwm_init(&light_ctrl.driver, &light_ctrl.config, NULL)); |
|
|
|
} |
|
|
|
static bool m_boardlight_loaded = false; |
|
|
|
|
|
|
@ -106,6 +105,7 @@ void BoardLight_load() { |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// m_boardlight_loaded = true; |
|
|
|
nrfx_pwm_init(&light_ctrl.driver, &light_ctrl.config, NULL); |
|
|
|
BoardLight_setGreenLightState(false); |
|
|
|
} |
|
|
|
void BoardLight_unload() { |
|
|
@ -114,6 +114,7 @@ void BoardLight_unload() { |
|
|
|
// } |
|
|
|
m_boardlight_loaded = false; |
|
|
|
BoardLight_setGreenLightEffect(kLightEffect_close); |
|
|
|
nrfx_pwm_uninit(&light_ctrl.driver); |
|
|
|
} |
|
|
|
|
|
|
|
void BoardLight_setGreenLightEffect(LightEffect_t effect) { |
|
|
|