Skip to content

Commit

Permalink
chore: add debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyc committed Jun 8, 2022
1 parent 3e9bef0 commit 03aaad3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pisugar-core/src/pisugar3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl PiSugar3 {
}

fn i2c_write_byte(&self, cmd: u8, data: u8) -> Result<()> {
log::debug!("i2c write cmd: 0x{:x}, data: 0x{:x}", cmd, data);
self.toggle_write_enable(true)?;
let r = self.i2c.smbus_write_byte(cmd, data);
self.toggle_write_enable(false)?;
Expand Down

0 comments on commit 03aaad3

Please sign in to comment.