Skip to content

Commit f46119f

Browse files
Merge pull request #280 from lulf/uarte-rx-buffer-error
Return correct error code in uarte start_read
2 parents d2eacea + 9d6ccdf commit f46119f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nrf-hal-common/src/uarte.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ where
260260
// This is overly restrictive. See (similar SPIM issue):
261261
// https://github.com/nrf-rs/nrf52/issues/17
262262
if rx_buffer.len() > u8::max_value() as usize {
263-
return Err(Error::TxBufferTooLong);
263+
return Err(Error::RxBufferTooLong);
264264
}
265265

266266
// NOTE: RAM slice check is not necessary, as a mutable slice can only be

0 commit comments

Comments
 (0)