bootloader: Call into the bootloader module from main().
[gps-watch.git] / src / bootloader / main.rs
index 198eb44e88355a21a44b746fb10d198a604a5054..e7746c0086c5829017c7b8dba60d6a0629038eea 100644 (file)
 
 extern crate common;
 
+mod flash;
+mod bootloader;
+
+use common::clock;
+use common::usb_serial;
+
 #[no_mangle]
 pub unsafe extern fn main() {
-    loop {
+    clock::configure();
+
+    if true {
+        usb_serial::init();
+
+        let mut b = bootloader::Bootloader::new();
+
+        loop {
+            b.run();
+        }
     }
 }