From 749633ddf2b5022f61cbba9350ce4d09f6b25691 Mon Sep 17 00:00:00 2001 From: Folkert Date: Sat, 5 Jun 2021 12:02:17 +0200 Subject: [PATCH] fix errors --- embassy-nrf/src/twim.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs index 2ecff774..160868d7 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(())