Fix kfile.c source include to allow the developers to build preset inside bertos.
[bertos.git] / boards / arduino / templates / empty / main.c
index 2bbaf0447b52c029b494235f77a512b396c964d5..407efe2049897fe97d67483c992cdef3a0c01e02 100644 (file)
  * supported board and proposes an empty main.
  */
 
+#include "hw/hw_led.h"
+
 #include <cfg/debug.h>
+
 #include <cpu/irq.h>
 #include <cpu/power.h>
-#include <hw/hw_led.h>
+
 #include <drv/timer.h>
 #include <drv/ser.h>
-#include <kern/proc.h>
-#include <drv/ser.h>
 
 static Serial out;
 
@@ -58,18 +59,23 @@ static void init(void)
        kdbg_init();
        /* Initialize system timer */
        timer_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();
-
-       /*
-        * Kernel initialization: processes (allow to create and dispatch
-        * processes using proc_new()).
-        */
-       proc_init();
 }
 
 int main(void)