We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2681915 commit 9ecdbb8Copy full SHA for 9ecdbb8
nrf-hal-common/src/uarte.rs
@@ -308,7 +308,7 @@ where
308
pub fn split(
309
self,
310
tx_buf: &'static mut [u8],
311
- rx_buf: &'static mut [u8],
+ rx_buf: &'static mut [u8; 1],
312
) -> Result<(UarteTx<T>, UarteRx<T>), Error> {
313
let tx = UarteTx::new(tx_buf)?;
314
let rx = UarteRx::new(rx_buf)?;
@@ -711,7 +711,7 @@ where
711
} else {
712
// We can only read 1 byte at a time, otherwise ENDTX might not be raised,
713
// causing the read to stall forever.
714
- start_read(&uarte, &mut self.rx_buf[..1])?;
+ start_read(&uarte, self.rx_buf)?;
715
Err(nb::Error::WouldBlock)
716
}
717
0 commit comments