Skip to content

Commit

Permalink
Merge pull request #98 from canokeys/feature/blink_initialization
Browse files Browse the repository at this point in the history
fix missing initialization for last_blink
  • Loading branch information
z4yx committed Aug 30, 2024
2 parents e50f2a7 + da4505b commit ad30d82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 device_init(void);
void stop_blinking(void);
uint8_t device_is_blinking(void);
bool device_allow_kbd_touch(void);
Expand Down
6 changes: 6 additions & 0 deletions src/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,9 @@ void stop_blinking(void) {
led_status = OFF;
}
}

void device_init(void) {
last_blink = 0;
stop_blinking();
set_touch_result(TOUCH_NO);
}

0 comments on commit ad30d82

Please sign in to comment.