A rebase ate my doc comment!
This commit is contained in:
parent
1ce96f79fb
commit
5e08bb8bc3
1 changed files with 4 additions and 0 deletions
|
@ -125,6 +125,7 @@ pub enum Error {
|
||||||
pub enum ReadToBreakError {
|
pub enum ReadToBreakError {
|
||||||
/// Read this many bytes, but never received a line break.
|
/// Read this many bytes, but never received a line break.
|
||||||
MissingBreak(usize),
|
MissingBreak(usize),
|
||||||
|
/// Other, standard issue with the serial request
|
||||||
Other(Error),
|
Other(Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -936,6 +937,9 @@ impl<'d, T: Instance> Uart<'d, T, Async> {
|
||||||
self.rx.read(buffer).await
|
self.rx.read(buffer).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Read until the buffer is full or a line break occurs.
|
||||||
|
///
|
||||||
|
/// See [`UartRx::read_to_break()`] for more details
|
||||||
pub async fn read_to_break<'a>(&mut self, buf: &'a mut [u8]) -> Result<usize, ReadToBreakError> {
|
pub async fn read_to_break<'a>(&mut self, buf: &'a mut [u8]) -> Result<usize, ReadToBreakError> {
|
||||||
self.rx.read_to_break(buf).await
|
self.rx.read_to_break(buf).await
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue