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:
2be180c
)
application: Perform system reset from panic handler if requested.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sat, 4 Jan 2020 18:29:57 +0000
(19:29 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 6 Jan 2020 09:45:34 +0000
(10:45 +0100)
This is untested; I'm not sure if it would work at all.
src/application/main.rs
patch
|
blob
|
history
diff --git
a/src/application/main.rs
b/src/application/main.rs
index 4cad3e326ee1720361a991c263b6e7ec3db33d16..92429e5d4a404d05ed0a4ef9bba4a544cabe60ff 100644
(file)
--- a/
src/application/main.rs
+++ b/
src/application/main.rs
@@
-79,6
+79,9
@@
impl Timer {
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {
+ if (gpio::get(gpio::GPIOA) & (1 << 12)) == 0 {
+ nvic::system_reset();
+ }
}
}