projects
/
gps-watch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
application: Configure PTA12 for push button use.
[gps-watch.git]
/
src
/
bootloader
/
main.rs
diff --git
a/src/bootloader/main.rs
b/src/bootloader/main.rs
index afd28dc994ca0794e33eb7f8d62d69dfda88d7db..a5fe9832d30a7cf6d18ed9ca3e130e5477818163 100644
(file)
--- a/
src/bootloader/main.rs
+++ b/
src/bootloader/main.rs
@@
-35,6
+35,7
@@
use common::clock;
use common::systick;
use common::port;
use common::gpio;
use common::systick;
use common::port;
use common::gpio;
+use common::watchdog;
use common::usb_serial;
type Reg32 = register::Register<u32>;
use common::usb_serial;
type Reg32 = register::Register<u32>;
@@
-64,6
+65,12
@@
unsafe fn application_missing() -> bool {
first_app_word.read() == 0xffffffff
}
first_app_word.read() == 0xffffffff
}
+#[cfg(bootloader_type = "intermediate")]
+fn bootloader_requested() -> bool {
+ true
+}
+
+#[cfg(bootloader_type = "final")]
fn bootloader_requested() -> bool {
let start_ticks = systick::now();
fn bootloader_requested() -> bool {
let start_ticks = systick::now();
@@
-78,6
+85,7
@@
fn bootloader_requested() -> bool {
#[no_mangle]
pub unsafe extern fn main() {
#[no_mangle]
pub unsafe extern fn main() {
+ watchdog::disable();
clock::configure();
systick::init();
port::init();
clock::configure();
systick::init();
port::init();
@@
-102,5
+110,7
@@
pub unsafe extern fn main() {
disable_interrupts();
disable_interrupts();
+ clock::reset();
+
jump_to_application(APPLICATION_ADDR);
}
jump_to_application(APPLICATION_ADDR);
}