Skip to content

Commit

Permalink
A rebase ate my doc comment!
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmunns committed Jan 19, 2024
1 parent 1ce96f7 commit 5e08bb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions embassy-rp/src/uart/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ pub enum Error {
pub enum ReadToBreakError {
/// Read this many bytes, but never received a line break.
MissingBreak(usize),
/// Other, standard issue with the serial request
Other(Error),
}

Expand Down Expand Up @@ -936,6 +937,9 @@ impl<'d, T: Instance> Uart<'d, T, Async> {
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> {
self.rx.read_to_break(buf).await
}
Expand Down

0 comments on commit 5e08bb8

Please sign in to comment.