diff --git a/include/device.h b/include/device.h index bc7e432e..cfb9968a 100644 --- a/include/device.h +++ b/include/device.h @@ -110,6 +110,7 @@ static inline void start_blinking(uint8_t sec) { static inline void start_quick_blinking(uint8_t sec) { if (!is_nfc()) start_blinking_interval(sec, 25); } +void init_led(void); void stop_blinking(void); uint8_t device_is_blinking(void); bool device_allow_kbd_touch(void); diff --git a/src/device.c b/src/device.c index 82d8f1e8..6d25723f 100644 --- a/src/device.c +++ b/src/device.c @@ -170,7 +170,6 @@ void start_blinking_interval(uint8_t sec, uint32_t interval) { void stop_blinking(void) { blink_timeout = 0; - last_blink = 0; if (cfg_is_led_normally_on()) { led_on(); led_status = ON; @@ -179,3 +178,8 @@ void stop_blinking(void) { led_status = OFF; } } + +void init_led(void) { + last_blink = 0; + stop_blinking(); +}