Add comments to the "empty" preset templates across the supported boards.
[bertos.git] / boards / arduino / templates / empty / main.c
index 0f9461990546722ea7666636512a0ee0d2113a5e..2bbaf0447b52c029b494235f77a512b396c964d5 100644 (file)
@@ -51,20 +51,32 @@ 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();
-
+       /* Initialize UART0 */
        ser_init(&out, SER_UART0);
+       /* Configure UART0 to work at 115.200 bps */
        ser_setbaudrate(&out, 115200);
+       /* Initialize LED driver */
+       LED_INIT();
+
+       /*
+        * Kernel initialization: processes (allow to create and dispatch
+        * processes using proc_new()).
+        */
+       proc_init();
 }
 
 int main(void)
 {
        init();
+
+       /* Put your code here... */
        while (1)
        {
        }