From: Tilman Sauerbeck Date: Sun, 5 Jan 2020 18:48:54 +0000 (+0100) Subject: application: Make system reset less likely do be run by accident. X-Git-Url: http://git.code-monkey.de/?p=gps-watch.git;a=commitdiff_plain;h=b00dd201b1c26fbd72c4930e26e3420ad8c276a0 application: Make system reset less likely do be run by accident. System reset is now triggered by holding the upper left and the lower right push button at the same time. --- diff --git a/src/application/main.rs b/src/application/main.rs index 0fe48f7..f1eb522 100644 --- a/src/application/main.rs +++ b/src/application/main.rs @@ -77,7 +77,10 @@ impl Timer { } fn reset_requested() -> bool { - (gpio::get(gpio::GPIOA) & (1 << 12)) == 0 + let pta1 = gpio::get(gpio::GPIOA) & (1 << 1); + let pte25 = gpio::get(gpio::GPIOE) & (1 << 25); + + (pta1 | pte25) == 0 } #[inline(never)]