uart: use proper interrupt decoding

This commit is contained in:
CTCaer committed 2021-03-17 08:51:49 +02:00
1 parent e8cf85bd65
commit 513f77a2ad
3 files changed
+18 -2

No files matched your search

+1 -1
View File
@@ -463,7 +463,7 @@ static void jc_rcv_pkt(joycon_ctxt_t *jc)
// Check if device stopped sending data.
u32 uart_irq = uart_get_IIR(jc->uart);
if ((uart_irq & 0x8) != 0x8)
if (uart_irq != UART_IIR_REDI)
return;
u32 len = uart_recv(jc->uart, (u8 *)jc->buf, 0x100);