Skip to content

Commit db91212

Browse files
committed
Auto merge of #22 - hannobraun:write-flush, r=japaric
Add `flush` method to `serial::Write` As suggested previously here: #3 (comment)
2 parents 0c260c1 + 9238350 commit db91212

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/serial.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ pub trait Write<Word> {
2626

2727
/// Writes a single word to the serial interface
2828
fn write(&mut self, word: Word) -> nb::Result<(), Self::Error>;
29+
30+
/// Ensures that none of the previously written words are still buffered
31+
fn flush(&mut self) -> nb::Result<(), Self::Error>;
2932
}

0 commit comments

Comments
 (0)