projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set a more conservative default.
[bertos.git]
/
app
/
triface
/
boot
/
main.c
diff --git
a/app/triface/boot/main.c
b/app/triface/boot/main.c
index 093a7f91d20955d749b7eb4a64176756076b7c11..dc105baf0374a10c02de0ee5ce608012b89edc5b 100644
(file)
--- 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/)
* the GNU General Public License.
*
* Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2000 Bern
ardo
Innocenti <bernie@codewiz.org>
+ * Copyright 2000 Bern
ie
Innocenti <bernie@codewiz.org>
*
* -->
*
*
* -->
*
@@
-46,7
+46,7
@@
* \author Daniele Basile <asterix@develer.com>
*/
* \author Daniele Basile <asterix@develer.com>
*/
-#include <
mware
/xmodem.h>
+#include <
net
/xmodem.h>
#include <cfg/compiler.h>
#include <cfg/debug.h>
#include <cfg/macros.h> /* BV() */
#include <cfg/compiler.h>
#include <cfg/debug.h>
#include <cfg/macros.h> /* BV() */
@@
-57,16
+57,18
@@
#include <drv/flash_avr.h>
#include "hw/hw_boot.h"
#include <drv/flash_avr.h>
#include "hw/hw_boot.h"
+#include "cfg/cfg_boot.h"
#include <string.h>
int main(void)
{
#include <string.h>
int main(void)
{
- KFile fd;
+ FlashAvr flash;
+ Serial ser;
// Set up flash programming functions.
// Set up flash programming functions.
- flash_avr_init(&f
d
);
+ flash_avr_init(&f
lash
);
IRQ_ENABLE;
IRQ_ENABLE;
@@
-74,17
+76,22
@@
int main(void)
kdbg_init();
timer_init();
kdbg_init();
timer_init();
- kprintf("Bertuccia");
+
+
/* Open the main communication port */
/* Open the main communication port */
- Serial *host_port = ser_open(CONFIG_SER_HOSTPORT);
- ser_setbaudrate(host_port, CONFIG_SER_HOSTPORTBAUDRATE);
- xmodem_recv(host_port, &fd);
- fd.close(&fd);
+ ser_init(&ser, CONFIG_SER_HOSTPORT);
+ ser_setbaudrate(&ser, CONFIG_SER_HOSTPORTBAUDRATE);
+
+ xmodem_recv(&ser, &flash.fd);
+ kfile_close(&flash.fd);
+ kfile_close(&ser.fd);
IRQ_DISABLE;
BOOT_END;
START_APP();
IRQ_DISABLE;
BOOT_END;
START_APP();
+
}
}
+