projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
111c167
)
application: Make system reset less likely do be run by accident.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 5 Jan 2020 18:48:54 +0000
(19:48 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Wed, 8 Jan 2020 11:06:51 +0000
(12:06 +0100)
System reset is now triggered by holding the upper left and the
lower right push button at the same time.
src/application/main.rs
patch
|
blob
|
history
diff --git
a/src/application/main.rs
b/src/application/main.rs
index 0fe48f7d490132ef68b06247002f4ac894bb697e..f1eb522a739068dda8977821c694e7bf768d215a 100644
(file)
--- 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)]