Skip to content

Commit

Permalink
wait until not busy
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrackow committed Nov 3, 2022
1 parent 21d9c06 commit dd73c1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@ macro_rules! i2c {
*byte = self.i2c.rxdr.read().rxdata().bits();
}

// automatic STOP
// Wait until the read finishes
busy_wait!(self.i2c, busy, is_not_busy);

Ok(())
}
Expand All @@ -657,7 +658,8 @@ macro_rules! i2c {
*byte = self.i2c.rxdr.read().rxdata().bits();
}

// automatic STOP
// Wait until the read finishes
busy_wait!(self.i2c, busy, is_not_busy);

Ok(())
}
Expand Down

0 comments on commit dd73c1e

Please sign in to comment.