diff options
Diffstat (limited to 'Sensor Watch Buzzer Demo/app.c')
-rw-r--r-- | Sensor Watch Buzzer Demo/app.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Sensor Watch Buzzer Demo/app.c b/Sensor Watch Buzzer Demo/app.c index 5c2dbc7b..4d378b5c 100644 --- a/Sensor Watch Buzzer Demo/app.c +++ b/Sensor Watch Buzzer Demo/app.c @@ -4,15 +4,12 @@ typedef struct ApplicationState { bool play; - bool debounce_wait; } ApplicationState; ApplicationState application_state; void cb_alarm_pressed() { - if (application_state.debounce_wait) return; - application_state.debounce_wait = true; application_state.play = true; } @@ -24,7 +21,7 @@ void app_wake_from_deep_sleep() { } void app_setup() { - watch_register_button_callback(BTN_ALARM, cb_alarm_pressed); + watch_register_extwake_callback(BTN_ALARM, cb_alarm_pressed, true); watch_enable_display(); @@ -129,9 +126,5 @@ bool app_loop() { } } - // Wait a moment to debounce button input - delay_ms(250); - application_state.debounce_wait = false; - return true; } |