aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32-h103
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2010-12-27 15:29:22 +0100
committerPiotr Esden-Tempski2010-12-27 15:29:22 +0100
commitbf0b987fe31b072c8d87420c89127a83a4ba1ea7 (patch)
tree234c53e8c186cf5d820337c6375fe4dfb53a0171 /examples/stm32-h103
parent571c4d37d02e9dd54a65241aec549e7e0875b01b (diff)
Splitted out the usart recv and send functions to have blocking and non blocking versions of those.
Diffstat (limited to 'examples/stm32-h103')
-rw-r--r--examples/stm32-h103/usart/usart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32-h103/usart/usart.c b/examples/stm32-h103/usart/usart.c
index d8ffe3d..4470348 100644
--- a/examples/stm32-h103/usart/usart.c
+++ b/examples/stm32-h103/usart/usart.c
@@ -69,11 +69,11 @@ int main(void)
/* Blink the LED (PC12) on the board with every transmitted byte. */
while (1) {
gpio_toggle(GPIOC, GPIO12); /* LED on/off */
- usart_send(USART3, c + '0'); /* Send one byte on USART3. */
+ usart_send_blocking(USART3, c + '0'); /* Send one byte on USART3. */
c = (c == 9) ? 0 : c + 1; /* Increment c. */
if ((j++ % 80) == 0) { /* Newline after line full. */
- usart_send(USART3, '\r');
- usart_send(USART3, '\n');
+ usart_send_blocking(USART3, '\r');
+ usart_send_blocking(USART3, '\n');
}
for (i = 0; i < 80000; i++); /* Wait (needs -O0 CFLAGS). */
}