Skip to content

Commit aea8b09

Browse files
Merge pull request #284 from jonas-schievink/uarte-rx-dmack
uarte: check rx buf against EASY_DMA_SIZE
2 parents 8a28455 + 717917a commit aea8b09

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

nrf-hal-common/src/uarte.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,7 @@ where
257257
/// Start a UARTE read transaction by setting the control
258258
/// values and triggering a read task.
259259
fn start_read(&mut self, rx_buffer: &mut [u8]) -> Result<(), Error> {
260-
// This is overly restrictive. See (similar SPIM issue):
261-
// https://github.com/nrf-rs/nrf52/issues/17
262-
if rx_buffer.len() > u8::max_value() as usize {
260+
if rx_buffer.len() > EASY_DMA_SIZE {
263261
return Err(Error::RxBufferTooLong);
264262
}
265263

0 commit comments

Comments
 (0)