common: Implement the "clear_storage" shell command.
[gps-watch.git] / src / application / main.rs
index 4096dc403707129edf83cd4156f929f18c396a41..3523b885fe9a907b081c9b85da75f9d8b3380643 100644 (file)
@@ -43,6 +43,7 @@ use common::display;
 use common::gps;
 use common::screen;
 use common::time::Time;
+use common::mx25l::Mx25l;
 use common::shell::Shell;
 
 extern {
@@ -189,6 +190,8 @@ pub unsafe extern "C" fn _start() -> ! {
 
     let mut shell = Shell::new(&mut cdc_tx_buf);
 
+    let mut mx25l = Mx25l::new(gpio::GPIOD, 1 << 0);
+
     let mut gps = gps::Gps::new();
 
     let mut gps_has_fix = false;
@@ -264,7 +267,7 @@ pub unsafe extern "C" fn _start() -> ! {
             }
         });
 
-        shell.update();
+        shell.update(&mut mx25l);
 
         if reset_requested() {
             nvic::system_reset();