Skip to content

Commit 335d6a1

Browse files
committed
add Flush for UART
1 parent ea183e9 commit 335d6a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/machine/machine_rp2040_uart.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,8 @@ func (uart *UART) handleInterrupt(interrupt.Interrupt) {
131131
}
132132
uart.Receive(byte((uart.Bus.UARTDR.Get() & 0xFF)))
133133
}
134+
135+
func (uart *UART) Flush() {
136+
for uart.Bus.UARTFR.HasBits(rp.UART0_UARTFR_BUSY) {
137+
}
138+
}

0 commit comments

Comments
 (0)