projects
/
gps-watch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bootloader: Use USB VID 0xf055 and PID 0x635c.
[gps-watch.git]
/
src
/
bootloader
/
main.rs
diff --git
a/src/bootloader/main.rs
b/src/bootloader/main.rs
index f54b4bcea02d8dbf161bf9f50fefb31e4a140699..83ef01133a68219c33a82289b65a21bab11ec197 100644
(file)
--- a/
src/bootloader/main.rs
+++ b/
src/bootloader/main.rs
@@
-33,6
+33,10
@@
mod bootloader;
use common::clock;
use common::usb_serial;
use common::clock;
use common::usb_serial;
+extern {
+ fn jump_to_application(address: u32);
+}
+
const APPLICATION_ADDR: u32 = 0x0;
#[no_mangle]
const APPLICATION_ADDR: u32 = 0x0;
#[no_mangle]
@@
-40,12
+44,13
@@
pub unsafe extern fn main() {
clock::configure();
if true {
clock::configure();
if true {
- usb_serial::init();
+ usb_serial::init(
0xf055, 0x635c
);
let mut b = bootloader::Bootloader::new();
let mut b = bootloader::Bootloader::new();
- loop {
- b.run();
+ while b.run() {
}
}
}
}
+
+ jump_to_application(__application_addr);
}
}