aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/ATSAMA5D2/UART/main.c
diff options
context:
space:
mode:
authoredolomb <none@example.com>2018-02-26 22:32:30 +0000
committeredolomb <none@example.com>2018-02-26 22:32:30 +0000
commit3492af817263b569286fafd9488ae6eea7ddd7fe (patch)
tree6ddb0413886df76a8aa62dd6b83fdd1541f9d1dc /testhal/ATSAMA5D2/UART/main.c
parent1f6ddb8b2dd0427d86a8b29f7cfd4c6b2d126287 (diff)
downloadChibiOS-3492af817263b569286fafd9488ae6eea7ddd7fe.tar.gz
ChibiOS-3492af817263b569286fafd9488ae6eea7ddd7fe.tar.bz2
ChibiOS-3492af817263b569286fafd9488ae6eea7ddd7fe.zip
Updated Demo
git-svn-id: https://svn.code.sf.net/p/chibios/svn2/trunk@11565 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'testhal/ATSAMA5D2/UART/main.c')
-rw-r--r--testhal/ATSAMA5D2/UART/main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/testhal/ATSAMA5D2/UART/main.c b/testhal/ATSAMA5D2/UART/main.c
index 12bf9b55d..8cd5aa714 100644
--- a/testhal/ATSAMA5D2/UART/main.c
+++ b/testhal/ATSAMA5D2/UART/main.c
@@ -114,9 +114,9 @@ static UARTConfig uart_cfg_1 = {
rxerr,
NULL,
0,
- 38400,
- 0,
- US_MR_CHRL_8_BIT | US_MR_PAR_NO
+ 38400, /* Baud rate */
+ 0, /* CR register */
+ US_MR_CHRL_8_BIT | US_MR_PAR_NO /* MR register */
};
/*
@@ -136,7 +136,8 @@ int main(void) {
chSysInit();
/*
- * Activates the flexcom uart driver 0, PB28(RX) and PB29(RX) are routed to FLEXCOM0.
+ * Activates the flexcom uart driver 0.
+ * PB28 and PB29 are routed to FLEXCOM0.
*/
uartStart(&FUARTD0, &uart_cfg_1);
@@ -150,16 +151,15 @@ int main(void) {
*/
while (true) {
if (!palReadPad(PIOB, PIOB_USER_PB)) {
- /*
- * Starts both a transmission and a receive operations, both will be
- * handled entirely in background.
- */
+ /*
+ * Starts both a transmission and a receive operations, both will be
+ * handled entirely in background.
+ */
uartStopReceive(&FUARTD0);
uartStopSend(&FUARTD0);
uartStartReceive(&FUARTD0, BUFFER, buffer);
uartStartSend(&FUARTD0, BUFFER+1, message);
}
-
chThdSleepMilliseconds(500);
}
}