Skip to content

Commit

Permalink
Merge pull request #60 from FrameworkComputer/i2c-trace
Browse files Browse the repository at this point in the history
ccgx: Add i2c log for port and address
  • Loading branch information
JohnAZoidberg authored Oct 21, 2024
2 parents 9f9df49 + 4942e1c commit 8ff67b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions framework_lib/src/ccgx/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ impl PdController {
}

fn i2c_read(&self, addr: u16, len: u16) -> EcResult<EcI2cPassthruResponse> {
trace!(
"I2C passthrough from I2C Port {} to I2C Addr {}",
self.port.i2c_port().unwrap(),
self.port.i2c_address()
);
trace!("i2c_read(addr: {}, len: {})", addr, len);
if usize::from(len) > MAX_I2C_CHUNK {
return EcResult::Err(EcError::DeviceError(format!(
Expand Down

0 comments on commit 8ff67b6

Please sign in to comment.