projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SEC: Fix entropy pool initialization and first reseed.
[bertos.git]
/
boards
/
arduino
/
templates
/
kernel
/
main.c
diff --git
a/boards/arduino/templates/kernel/main.c
b/boards/arduino/templates/kernel/main.c
index 6b7412a6879ad7ec97e8104be9194a37ca485b0d..663386f45c0723008699f85f6d76a1abdf6c8d69 100644
(file)
--- a/
boards/arduino/templates/kernel/main.c
+++ b/
boards/arduino/templates/kernel/main.c
@@
-39,12
+39,16
@@
* continues to monitor the stack utilization of all the processes.
*/
* continues to monitor the stack utilization of all the processes.
*/
+#include "hw/hw_led.h"
+
#include <cfg/debug.h>
#include <cfg/debug.h>
+
#include <cpu/irq.h>
#include <cpu/power.h>
#include <cpu/irq.h>
#include <cpu/power.h>
-#include <hw/hw_led.h>
+
#include <drv/timer.h>
#include <drv/ser.h>
#include <drv/timer.h>
#include <drv/ser.h>
+
#include <kern/proc.h>
#include <kern/monitor.h>
#include <kern/proc.h>
#include <kern/monitor.h>
@@
-59,10
+63,20
@@
static void init(void)
kdbg_init();
/* Initialize system timer */
timer_init();
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);
/* 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();
/* Initialize LED driver */
LED_INIT();
@@
-94,7
+108,7
@@
int main(void)
init();
/* Create a new child process */
init();
/* Create a new child process */
- proc_new(led_process, NULL, KERN_MINSTACKSIZE, NULL);
+ proc_new(led_process, NULL, KERN_MINSTACKSIZE
* 2
, NULL);
/*
* The main process is kept to periodically report the stack
/*
* The main process is kept to periodically report the stack