aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2024-01-19 15:46:36 +0100
committerJames Munns <[email protected]>2024-01-19 15:46:36 +0100
commit5e08bb8bc3a7e0e308cbada03c9c363cdf5223b9 (patch)
treede77ef8c0c60d00808a761e74abcbbce3236332d
parent1ce96f79fb356b29b882a3571415f347e48e89c9 (diff)
A rebase ate my doc comment!
-rw-r--r--embassy-rp/src/uart/mod.rs4
1 files changed, 4 insertions, 0 deletions
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 {
125pub enum ReadToBreakError { 125pub enum ReadToBreakError {
126 /// Read this many bytes, but never received a line break. 126 /// Read this many bytes, but never received a line break.
127 MissingBreak(usize), 127 MissingBreak(usize),
128 /// Other, standard issue with the serial request
128 Other(Error), 129 Other(Error),
129} 130}
130 131
@@ -936,6 +937,9 @@ impl<'d, T: Instance> Uart<'d, T, Async> {
936 self.rx.read(buffer).await 937 self.rx.read(buffer).await
937 } 938 }
938 939
940 /// Read until the buffer is full or a line break occurs.
941 ///
942 /// See [`UartRx::read_to_break()`] for more details
939 pub async fn read_to_break<'a>(&mut self, buf: &'a mut [u8]) -> Result<usize, ReadToBreakError> { 943 pub async fn read_to_break<'a>(&mut self, buf: &'a mut [u8]) -> Result<usize, ReadToBreakError> {
940 self.rx.read_to_break(buf).await 944 self.rx.read_to_break(buf).await
941 } 945 }