Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
Update serial.c
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeio committed Jan 28, 2021
1 parent b817d01 commit f0f65d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/RP2040/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ bool serialPutC (const char c)
txbuffer.data[txbuffer.head] = c; // Add data to buffer
txbuffer.head = next_head; // and update head pointer

uart_set_irq_enables(UART_PORT, true, true);
hw_set_bits(UART->imsc, UART_UARTIMSC_TXIM_BITS);

return true;
}
Expand Down Expand Up @@ -205,10 +205,10 @@ static void uart_interrupt_handler (void)
txbuffer.tail = bptr; // Update tail pinter

if(bptr == txbuffer.head) // Disable TX interrups
UART->imsc &= ~UART_UARTIMSC_TXIM_BITS;
hw_clear_bits(UART->imsc, UART_UARTIMSC_TXIM_BITS);
}

if (ctrl & UART_UARTMIS_TXMIS_BITS) {
if (ctrl & UART_UARTMIS_RXMIS_BITS) {

while (uart_is_readable(UART_PORT)) {

Expand Down

0 comments on commit f0f65d6

Please sign in to comment.