X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=app%2Ftriface%2Fboot%2Fmain.c;h=97b1cefc4b6621d55090ddf9cd7ce6a9655fb66a;hb=4cc44c9888a0336b9d01121ec0b7ad95f4a76195;hp=85b7c9036841161be628ea752c2288ee8dc559f0;hpb=d22dfaec1fff3dfb5d216b0317f6e2845313f688;p=bertos.git diff --git a/app/triface/boot/main.c b/app/triface/boot/main.c index 85b7c903..97b1cefc 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; + 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(); + } +