From 697d4f307ac79505771775e78cd956590d73a67c Mon Sep 17 00:00:00 2001 From: Ken Sarkies Date: Wed, 19 Feb 2014 17:19:42 +1030 Subject: [PATCH] STM32F1xx RTC example: Change usart_send to blocking form to allow time to send characters Tested with ET-STAMP-STM32 --- examples/stm32/f1/other/rtc/rtc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/stm32/f1/other/rtc/rtc.c b/examples/stm32/f1/other/rtc/rtc.c index e45cc15..32b369c 100644 --- a/examples/stm32/f1/other/rtc/rtc.c +++ b/examples/stm32/f1/other/rtc/rtc.c @@ -83,12 +83,13 @@ void rtc_isr(void) /* Display the current counter value in binary via USART1. */ for (j = 0; j < 32; j++) { if ((c & (0x80000000 >> j)) != 0) { - usart_send(USART1, '1'); + usart_send_blocking(USART1, '1'); } else { - usart_send(USART1, '0'); + usart_send_blocking(USART1, '0'); } } - usart_send(USART1, '\n'); + usart_send_blocking(USART1, '\n'); + usart_send_blocking(USART1, '\r'); } int main(void)