X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=app%2Ftriface%2Fboot%2Fmain.c;h=dc105baf0374a10c02de0ee5ce608012b89edc5b;hb=656eb15bf18229f44f671a75a12ea7a2fb88edc5;hp=85b7c9036841161be628ea752c2288ee8dc559f0;hpb=d22dfaec1fff3dfb5d216b0317f6e2845313f688;p=bertos.git diff --git a/app/triface/boot/main.c b/app/triface/boot/main.c index 85b7c903..dc105baf 100644 --- a/app/triface/boot/main.c +++ b/app/triface/boot/main.c @@ -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 + * Copyright 2000 Bernie Innocenti * * --> * @@ -63,12 +63,12 @@ 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(); + } +