From 921a6aebe8db6aae1757533be0228388aa285708 Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 28 May 2010 13:49:10 +0000 Subject: [PATCH] Disable serial driver on Arduino. The UART is used by the debug module, so it cannot be used by the serial driver at the same time. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3873 38d2e660-2303-0410-9eaa-f027e97ec537 --- boards/arduino/templates/empty/main.c | 11 +++++++++++ boards/arduino/templates/kernel/main.c | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/boards/arduino/templates/empty/main.c b/boards/arduino/templates/empty/main.c index 1b6b79a6..407efe20 100644 --- a/boards/arduino/templates/empty/main.c +++ b/boards/arduino/templates/empty/main.c @@ -59,10 +59,21 @@ 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(); } diff --git a/boards/arduino/templates/kernel/main.c b/boards/arduino/templates/kernel/main.c index ff8b2f12..663386f4 100644 --- a/boards/arduino/templates/kernel/main.c +++ b/boards/arduino/templates/kernel/main.c @@ -63,10 +63,20 @@ 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(); -- 2.25.1