From 201a9c869854909b57122425e4d48ba9e6967ee4 Mon Sep 17 00:00:00 2001 From: qwert Date: Fri, 18 Jul 2008 15:41:33 +0000 Subject: [PATCH] New main with KFileFlashAvr support, working git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1505 38d2e660-2303-0410-9eaa-f027e97ec537 --- app/triface/boot/main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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(); + } + -- 2.25.1