Also fix get_priority_mask() return value check in serial_flush()
authorNathael Pajani <nathael.pajani@ed3l.fr>
Fri, 9 Dec 2016 01:33:08 +0000 (02:33 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000 (17:03 +0100)
drivers/serial.c

index 7698069..155478e 100644 (file)
@@ -237,7 +237,7 @@ int serial_flush(uint32_t uart_num)
        /* Active wait for message to be sent. If interrupts are
         * disabled, call the UART handler while waiting. */
        while (uart->sending) {
-               if (get_priority_mask() == 0) {
+               if (get_priority_mask() != 0) {
                        uart_check_tx(uart, uart->regs->func.intr_pending);
                }
        }