From 9994b1fc40afc164e9cbed78310cf19c04e10228 Mon Sep 17 00:00:00 2001 From: finga Date: Sat, 2 Apr 2022 18:24:31 +0200 Subject: [PATCH] fw-rust: Improve debouncing when going back When pressing the button until the timer1 creates an interrupt in order to create a "back" event, there were some debouncing problems. --- firmware/rust/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/firmware/rust/src/main.rs b/firmware/rust/src/main.rs index 8f377a5..5436d92 100644 --- a/firmware/rust/src/main.rs +++ b/firmware/rust/src/main.rs @@ -160,6 +160,7 @@ impl ClockGenerator { if self.tc1.tccr1b.read().cs1().is_prescale_64() { self.tc1.tccr1b.write(|w| w.cs1().no_clock()); self.screen.input(&Input::Select); + self.delay.delay_ms(3_u8); } } UPDATE_BUTTON.store(false, Ordering::SeqCst);