STM32F1xx RTC example: Change usart_send to blocking form to allow time to send characters

Tested with ET-STAMP-STM32
This commit is contained in:
Ken Sarkies
2014-02-19 17:19:42 +10:30
committed by Karl Palsson
parent b779843799
commit 697d4f307a

View File

@@ -83,12 +83,13 @@ void rtc_isr(void)
/* Display the current counter value in binary via USART1. */ /* Display the current counter value in binary via USART1. */
for (j = 0; j < 32; j++) { for (j = 0; j < 32; j++) {
if ((c & (0x80000000 >> j)) != 0) { if ((c & (0x80000000 >> j)) != 0) {
usart_send(USART1, '1'); usart_send_blocking(USART1, '1');
} else { } 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) int main(void)