bootloader: Use USB VID 0xf055 and PID 0x635c.
[gps-watch.git] / src / bootloader / main.rs
index 9a0cbb4f48706007e934c35d35b7ffa1db38dcb3..83ef01133a68219c33a82289b65a21bab11ec197 100644 (file)
 
 extern crate common;
 
+mod flash;
+mod bootloader;
+
 use common::clock;
+use common::usb_serial;
+
+extern {
+    fn jump_to_application(address: u32);
+}
+
+const APPLICATION_ADDR: u32 = 0x0;
 
 #[no_mangle]
 pub unsafe extern fn main() {
     clock::configure();
 
-    loop {
+    if true {
+        usb_serial::init(0xf055, 0x635c);
+
+        let mut b = bootloader::Bootloader::new();
+
+        while b.run() {
+        }
     }
+
+    jump_to_application(__application_addr);
 }