Skip to content

Commit 8e8d098

Browse files
committed
blocking/serial: make method naming consistent
1 parent b60c39a commit 8e8d098

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/blocking/serial.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ pub trait Write<Word> {
1010
/// An implementation can choose to buffer the write, returning `Ok(())`
1111
/// after the complete slice has been written to a buffer, but before all
1212
/// words have been sent via the serial interface. To make sure that
13-
/// everything has been sent, call [`bflush`] after this function returns.
13+
/// everything has been sent, call [`flush`] after this function returns.
1414
///
15-
/// [`bflush`]: #tymethod.bflush
16-
fn bwrite_all(&mut self, buffer: &[Word]) -> Result<(), Self::Error>;
15+
/// [`flush`]: #tymethod.flush
16+
fn write(&mut self, buffer: &[Word]) -> Result<(), Self::Error>;
1717

1818
/// Block until the serial interface has sent all buffered words
19-
fn bflush(&mut self) -> Result<(), Self::Error>;
19+
fn flush(&mut self) -> Result<(), Self::Error>;
2020
}
2121

2222
/// Blocking serial write
@@ -38,15 +38,15 @@ pub mod write {
3838
{
3939
type Error = S::Error;
4040

41-
fn bwrite_all(&mut self, buffer: &[Word]) -> Result<(), Self::Error> {
41+
fn write(&mut self, buffer: &[Word]) -> Result<(), Self::Error> {
4242
for word in buffer {
4343
nb::block!(self.write(word.clone()))?;
4444
}
4545

4646
Ok(())
4747
}
4848

49-
fn bflush(&mut self) -> Result<(), Self::Error> {
49+
fn flush(&mut self) -> Result<(), Self::Error> {
5050
nb::block!(self.flush())?;
5151
Ok(())
5252
}

0 commit comments

Comments
 (0)