X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=app%2Ftriface%2Fboot%2Fmain.c;h=85b7c9036841161be628ea752c2288ee8dc559f0;hb=d22dfaec1fff3dfb5d216b0317f6e2845313f688;hp=093a7f91d20955d749b7eb4a64176756076b7c11;hpb=4e8d0f2f4b4e158963ac78bb7c1356621fb638c0;p=bertos.git diff --git a/app/triface/boot/main.c b/app/triface/boot/main.c index 093a7f91..85b7c903 100644 --- a/app/triface/boot/main.c +++ b/app/triface/boot/main.c @@ -46,7 +46,7 @@ * \author Daniele Basile */ -#include +#include #include #include #include /* BV() */ @@ -57,12 +57,14 @@ #include #include "hw/hw_boot.h" +#include "cfg/cfg_boot.h" #include int main(void) { KFile fd; + KFileSerial ser; // Set up flash programming functions. @@ -74,13 +76,13 @@ int main(void) kdbg_init(); timer_init(); - kprintf("Bertuccia"); /* Open the main communication port */ - Serial *host_port = ser_open(CONFIG_SER_HOSTPORT); - ser_setbaudrate(host_port, CONFIG_SER_HOSTPORTBAUDRATE); + ser_init(&ser, CONFIG_SER_HOSTPORT); + ser_setbaudrate(&ser, CONFIG_SER_HOSTPORTBAUDRATE); - xmodem_recv(host_port, &fd); - fd.close(&fd); + xmodem_recv(&ser, &fd); + kfile_close(&fd); + kfile_close(&ser.fd); IRQ_DISABLE;