diff options
Diffstat (limited to 'embassy-rp/src/uart')
| -rw-r--r-- | embassy-rp/src/uart/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-rp/src/uart/mod.rs b/embassy-rp/src/uart/mod.rs index c3a15fda5..b730d33e3 100644 --- a/embassy-rp/src/uart/mod.rs +++ b/embassy-rp/src/uart/mod.rs | |||
| @@ -515,6 +515,9 @@ impl<'d> UartRx<'d, Async> { | |||
| 515 | /// * If you expect a message of 20 bytes + line break, and provide a 21-byte buffer: | 515 | /// * If you expect a message of 20 bytes + line break, and provide a 21-byte buffer: |
| 516 | /// * The first call to `read_to_break()` will return `Ok(20)`. | 516 | /// * The first call to `read_to_break()` will return `Ok(20)`. |
| 517 | /// * The next call to `read_to_break()` will work as expected | 517 | /// * The next call to `read_to_break()` will work as expected |
| 518 | /// | ||
| 519 | /// **NOTE**: In the UART context, a line break refers to a break condition (the line being held low for | ||
| 520 | /// for longer than a single character), not an ASCII line break. | ||
| 518 | pub async fn read_to_break(&mut self, buffer: &mut [u8]) -> Result<usize, ReadToBreakError> { | 521 | pub async fn read_to_break(&mut self, buffer: &mut [u8]) -> Result<usize, ReadToBreakError> { |
| 519 | self.read_to_break_with_count(buffer, 0).await | 522 | self.read_to_break_with_count(buffer, 0).await |
| 520 | } | 523 | } |
| @@ -541,6 +544,9 @@ impl<'d> UartRx<'d, Async> { | |||
| 541 | /// * If you expect a message of 20 bytes + line break, and provide a 21-byte buffer: | 544 | /// * If you expect a message of 20 bytes + line break, and provide a 21-byte buffer: |
| 542 | /// * The first call to `read_to_break()` will return `Ok(20)`. | 545 | /// * The first call to `read_to_break()` will return `Ok(20)`. |
| 543 | /// * The next call to `read_to_break()` will work as expected | 546 | /// * The next call to `read_to_break()` will work as expected |
| 547 | /// | ||
| 548 | /// **NOTE**: In the UART context, a line break refers to a break condition (the line being held low for | ||
| 549 | /// for longer than a single character), not an ASCII line break. | ||
| 544 | pub async fn read_to_break_with_count( | 550 | pub async fn read_to_break_with_count( |
| 545 | &mut self, | 551 | &mut self, |
| 546 | buffer: &mut [u8], | 552 | buffer: &mut [u8], |
