Add missing assert.
[bertos.git] / app / triface / boot / main.c
index 85b7c9036841161be628ea752c2288ee8dc559f0..dc105baf0374a10c02de0ee5ce608012b89edc5b 100644 (file)
@@ -27,7 +27,7 @@
  * the GNU General Public License.
  *
  * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
+ * Copyright 2000 Bernie Innocenti <bernie@codewiz.org>
  *
  * -->
  *
 
 int main(void)
 {
-       KFile fd;
-       KFileSerial ser;
+       FlashAvr flash;
+       Serial ser;
 
 
        // Set up flash programming functions.
-       flash_avr_init(&fd);
+       flash_avr_init(&flash);
 
        IRQ_ENABLE;
 
@@ -76,12 +76,15 @@ int main(void)
 
        kdbg_init();
        timer_init();
+
+
        /* Open the main communication port */
+
        ser_init(&ser, CONFIG_SER_HOSTPORT);
        ser_setbaudrate(&ser, CONFIG_SER_HOSTPORTBAUDRATE);
 
-       xmodem_recv(&ser, &fd);
-       kfile_close(&fd);
+       xmodem_recv(&ser, &flash.fd);
+       kfile_close(&flash.fd);
     kfile_close(&ser.fd);
 
        IRQ_DISABLE;
@@ -89,4 +92,6 @@ int main(void)
        BOOT_END;
 
        START_APP();
+
 }
+