From: qwert Date: Fri, 18 Jul 2008 15:41:33 +0000 (+0000) Subject: New main with KFileFlashAvr support, working X-Git-Tag: 2.0.0~429 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=201a9c869854909b57122425e4d48ba9e6967ee4;p=bertos.git New main with KFileFlashAvr support, working git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1505 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/triface/boot/main.c b/app/triface/boot/main.c index 85b7c903..12ad3a65 100644 --- a/app/triface/boot/main.c +++ b/app/triface/boot/main.c @@ -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(); + } +