File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,14 @@ pub fn set_tx_watermark(rb: &RegisterBlock, watermark: FifoWatermark) {
26
26
rb. uartifls . modify ( |_r, w| unsafe { w. txiflsel ( ) . bits ( wm) } ) ;
27
27
}
28
28
29
- /// Returns `Err(WouldBlock)` if the UART TX FIFO still has data in it or
30
- /// `Ok(())` if the FIFO is empty.
29
+ /// Returns `Err(WouldBlock)` if the UART is still busy transmitting data.
30
+ /// It returns Ok(()) when the TX fifo and the transmit shift register are empty
31
+ /// and the last stop bit is sent.
31
32
pub ( crate ) fn transmit_flushed ( rb : & RegisterBlock ) -> nb:: Result < ( ) , Infallible > {
32
- if rb. uartfr . read ( ) . txfe ( ) . bit_is_set ( ) {
33
- Ok ( ( ) )
34
- } else {
33
+ if rb. uartfr . read ( ) . busy ( ) . bit_is_set ( ) {
35
34
Err ( WouldBlock )
35
+ } else {
36
+ Ok ( ( ) )
36
37
}
37
38
}
38
39
You can’t perform that action at this time.
0 commit comments