From 5e08bb8bc3a7e0e308cbada03c9c363cdf5223b9 Mon Sep 17 00:00:00 2001 From: James Munns Date: Fri, 19 Jan 2024 15:46:36 +0100 Subject: [PATCH] A rebase ate my doc comment! --- embassy-rp/src/uart/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/embassy-rp/src/uart/mod.rs b/embassy-rp/src/uart/mod.rs index a9ae6c3f4..9f5ba4e8a 100644 --- a/embassy-rp/src/uart/mod.rs +++ b/embassy-rp/src/uart/mod.rs @@ -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), } @@ -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 { self.rx.read_to_break(buf).await }