diff options
author | Gerrit <chrome-bot@google.com> | 2012-02-29 15:26:25 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2012-02-29 15:26:25 -0800 |
commit | 42a9405d112864f15ffd6df96bebcb293d656dc6 (patch) | |
tree | db2a2df422d548d2bb42c44b33da53717b5deefc | |
parent | aacc1e6b5fae797113f68aff01a5546042b9676e (diff) | |
parent | 9ecf232dbd4d432c6da6b7bc0da35a04e0736644 (diff) | |
download | chrome-ec-42a9405d112864f15ffd6df96bebcb293d656dc6.tar.gz |
Merge "stm32l: fix new line output on the UART"
-rw-r--r-- | chip/stm32l/uart.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chip/stm32l/uart.c b/chip/stm32l/uart.c index 0127c7bf72..9d5dd139f7 100644 --- a/chip/stm32l/uart.c +++ b/chip/stm32l/uart.c @@ -59,6 +59,11 @@ int uart_rx_available(void) void uart_write_char(char c) { + /* we normally never wait here since uart_write_char is normally called + * when the buffer is ready, excepted when we insert a carriage return + * before a line feed in the interrupt routine. + */ + while (!uart_tx_ready()) ; STM32L_USART_DR(UARTN) = c; } |