Skip to content

Commit

Permalink
Replaced busy check with wait in
Browse files Browse the repository at this point in the history
fn set_block_and_offset()
  • Loading branch information
amcelroy committed May 17, 2023
1 parent 93f2457 commit f8db917
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tm4c123x-hal/src/eeprom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ impl Eeprom {

/// Set the block and offset registers
fn set_block_and_offset(&self, address: &EepromAddress) -> Result<(), EepromError> {
if self.is_busy() {
return Err(EepromError::Busy);
}

self.wait();
self.set_block(address.block())?;
self.set_offset(address.offset())?;
Ok(())
Expand Down

0 comments on commit f8db917

Please sign in to comment.