Skip to content

Commit cf11f38

Browse files
committed
Require a slice of size 1 for rx_buf
1 parent d25a746 commit cf11f38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nrf-hal-common/src/uarte.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ where
271271
pub fn split(
272272
self,
273273
tx_buf: &'static mut [u8],
274-
rx_buf: &'static mut [u8],
274+
rx_buf: &'static mut [u8; 1],
275275
) -> Result<(UarteTx<T>, UarteRx<T>), Error> {
276276
let tx = UarteTx::new(tx_buf)?;
277277
let rx = UarteRx::new(rx_buf)?;
@@ -674,7 +674,7 @@ where
674674
} else {
675675
// We can only read 1 byte at a time, otherwise ENDTX might not be raised,
676676
// causing the read to stall forever.
677-
start_read(&uarte, &mut self.rx_buf[..1])?;
677+
start_read(&uarte, self.rx_buf)?;
678678
Err(nb::Error::WouldBlock)
679679
}
680680
}

0 commit comments

Comments
 (0)