X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=boards%2Farduino%2Ftemplates%2Fempty%2Fmain.c;h=407efe2049897fe97d67483c992cdef3a0c01e02;hb=45f8c1d234da52d83e76bc7a52f1b83bfd7dc6be;hp=0f9461990546722ea7666636512a0ee0d2113a5e;hpb=b73ab8af789a79c3beebf051f690a9eed4ddacd0;p=bertos.git diff --git a/boards/arduino/templates/empty/main.c b/boards/arduino/templates/empty/main.c index 0f946199..407efe20 100644 --- a/boards/arduino/templates/empty/main.c +++ b/boards/arduino/templates/empty/main.c @@ -38,33 +38,51 @@ * supported board and proposes an empty main. */ +#include "hw/hw_led.h" + #include + #include #include -#include + #include #include -#include -#include static Serial out; static void init(void) { + /* Enable all the interrupts */ IRQ_ENABLE; + /* Initialize debugging module (allow kprintf(), etc.) */ kdbg_init(); + /* Initialize system timer */ timer_init(); - proc_init(); - LED_INIT(); + /* + * XXX: Arduino has a single UART port that was previously + * initialized for debugging purpose. + * In order to activate the serial driver you should disable + * the debugging module. + */ +#if 0 + /* Initialize UART0 */ ser_init(&out, SER_UART0); + /* Configure UART0 to work at 115.200 bps */ ser_setbaudrate(&out, 115200); +#else + (void)out; +#endif + /* Initialize LED driver */ + LED_INIT(); } int main(void) { init(); + + /* Put your code here... */ while (1) { }