From d9b1b2b1ec77d8a26fb351be6add2cd981d362c3 Mon Sep 17 00:00:00 2001 From: Nic0w Date: Tue, 4 May 2021 19:48:40 +0200 Subject: [PATCH] Fix comments on {read,write}_raw() functions --- rp2040-hal/src/uart.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rp2040-hal/src/uart.rs b/rp2040-hal/src/uart.rs index d0208f1..b6dbee9 100644 --- a/rp2040-hal/src/uart.rs +++ b/rp2040-hal/src/uart.rs @@ -247,7 +247,7 @@ impl UARTPeripheral { /// This function writes as long as it can. As soon that the FIFO is full, if : /// - 0 bytes were written, a WouldBlock Error is returned /// - some bytes were written, it is deemed to be a success - /// Upon success, the number of written bytes is returned. + /// Upon success, the remaining slice is returned. pub fn write_raw<'d>(&self, data: &'d [u8]) -> nb::Result<&'d [u8], Infallible> { let mut bytes_written = 0; @@ -274,7 +274,7 @@ impl UARTPeripheral { /// This function reads as long as it can. As soon that the FIFO is empty, if : /// - 0 bytes were read, a WouldBlock Error is returned /// - some bytes were read, it is deemed to be a success - /// Upon success, the number of read bytes is returned. + /// Upon success, the remaining slice is returned. pub fn read_raw<'b>(&self, buffer: &'b mut [u8]) -> nb::Result<&'b mut [u8], ReadError<'b>> { let mut bytes_read = 0;