Fix timer when run in bertos emulator.
[bertos.git] / app / triface / boot / main.c
index 85b7c9036841161be628ea752c2288ee8dc559f0..12ad3a65e8f9b0a5022686c0ee28a4996a6d1654 100644 (file)
 
 int main(void)
 {
-       KFile fd;
+       KFileFlashAvr flash;
        KFileSerial 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();
+
 }
+