diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs index 2ecff7742..160868d7d 100644 --- a/embassy-nrf/src/twim.rs +++ b/embassy-nrf/src/twim.rs @@ -635,11 +635,11 @@ where let bad_read = r.rxd.amount.read().bits() != buffer.len() as u32; if bad_write { - return Err(Error::TxBufferTooLong); + return Err(Error::Transmit); } if bad_read { - return Err(Error::RxBufferTooLong); + return Err(Error::Receive); } Ok(())