Skip to content
Snippets Groups Projects
Commit 55b2d484 authored by Kaspar Schleiser's avatar Kaspar Schleiser Committed by GitHub
Browse files

Merge pull request #7638 from smlng/cpu/sam0_common/fix_uart

cpu, sam0_common: fix uart TXC check
parents a13eca1b 732e60bb
No related branches found
No related tags found
No related merge requests found
...@@ -121,8 +121,8 @@ void uart_write(uart_t uart, const uint8_t *data, size_t len) ...@@ -121,8 +121,8 @@ void uart_write(uart_t uart, const uint8_t *data, size_t len)
for (size_t i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {
while (!(dev(uart)->INTFLAG.reg & SERCOM_USART_INTFLAG_DRE)) {} while (!(dev(uart)->INTFLAG.reg & SERCOM_USART_INTFLAG_DRE)) {}
dev(uart)->DATA.reg = data[i]; dev(uart)->DATA.reg = data[i];
while (dev(uart)->INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) {}
} }
while (!(dev(uart)->INTFLAG.reg & SERCOM_USART_INTFLAG_TXC)) {}
} }
void uart_poweron(uart_t uart) void uart_poweron(uart_t uart)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment