From 3f07845d102299fe708dbb5fac4e4f81802e8249 Mon Sep 17 00:00:00 2001 From: Stefan Rakel Date: Tue, 25 Jun 2019 18:27:36 +0200 Subject: [PATCH] Stop doesn't seem to be an error condition as it is set on reads also --- src/i2c.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/i2c.rs b/src/i2c.rs index 3771251..69065d6 100644 --- a/src/i2c.rs +++ b/src/i2c.rs @@ -15,8 +15,6 @@ use hal::blocking::i2c::{Read, Write, WriteRead}; /// I2C error #[derive(Debug)] pub enum Error { - /// Stop condition detected - Stop, /// NACK received, i.e. communication not acknowledged by peripheral NACK, /// Bus error @@ -63,8 +61,6 @@ macro_rules! busy_wait { return Err(Error::Arbitration); } else if isr.nackf().bit_is_set() { return Err(Error::NACK); - } else if isr.stopf().bit_is_set() { - return Err(Error::Stop); } else if isr.$flag().bit_is_set() { break; } else {