application: Integrate flash storage via Mx25l.
[gps-watch.git] / src / application / main.rs
index f1eb522a739068dda8977821c694e7bf768d215a..cf06f640b529cc8b79c2247762bcb308b6028b7f 100644 (file)
@@ -43,6 +43,8 @@ use common::display;
 use common::gps;
 use common::screen;
 use common::time::Time;
+use common::mx25l::Mx25l;
+use common::shell::Shell;
 
 extern {
     fn enable_interrupts();
@@ -186,6 +188,10 @@ pub unsafe extern "C" fn _start() -> ! {
 
     nvic::enable_irq(12); // UART0
 
+    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;
@@ -261,6 +267,8 @@ pub unsafe extern "C" fn _start() -> ! {
             }
         });
 
+        shell.update();
+
         if reset_requested() {
             nvic::system_reset();
         }