Skip to content

Commit

Permalink
Stop doesn't seem to be an error condition as it is set on reads also
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Rakel committed Jun 25, 2019
1 parent e03086f commit 3f07845
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 3f07845

Please sign in to comment.