common: Initialize the usb_serial module with an USB VID and PID pair.
[gps-watch.git] / src / bootloader / main.rs
index e7746c0086c5829017c7b8dba60d6a0629038eea..88a9a0bcf263c1cef50b517310bbd2fdbf8f6b88 100644 (file)
@@ -33,17 +33,24 @@ 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();
 
     if true {
-        usb_serial::init();
+        usb_serial::init(0x1fc9, 0x0094);
 
         let mut b = bootloader::Bootloader::new();
 
-        loop {
-            b.run();
+        while b.run() {
         }
     }
+
+    jump_to_application(__application_addr);
 }