adding comment for uart_wait_idle to warn about a possible dead lock

This commit is contained in:
Resaec 2018-04-28 01:13:16 +02:00
parent 5dcf2cb319
commit dd319debe8

View file

@ -36,6 +36,7 @@ void uart_init(UartDevice dev, uint32_t baud) {
uart->UART_ASR = 0; uart->UART_ASR = 0;
} }
/* This function blocks until the UART device (dev) is in the desired state (status). Make sure the desired state can be reached! */
void uart_wait_idle(UartDevice dev, UartVendorStatus status) { void uart_wait_idle(UartDevice dev, UartVendorStatus status) {
while (!(get_uart_device(dev)->UART_VENDOR_STATUS & status)) { while (!(get_uart_device(dev)->UART_VENDOR_STATUS & status)) {
/* Wait */ /* Wait */