MCPcopy Create free account
hub / github.com/FrameworkComputer/framework-system / i2c_write

Method i2c_write

framework_lib/src/ccgx/device.rs:212–225  ·  view source on GitHub ↗
(&self, addr: u16, data: &[u8])

Source from the content-addressed store, hash-verified

210 }
211
212 pub fn i2c_write(&self, addr: u16, data: &[u8]) -> EcResult<EcI2cPassthruResponse> {
213 trace!(
214 "I2C passthrough from I2C Port {} to I2C Addr {}",
215 self.port.i2c_port()?,
216 self.port.i2c_address()?
217 );
218 i2c_write(
219 &self.ec,
220 self.port.i2c_port()?,
221 self.port.i2c_address()?,
222 addr,
223 data,
224 )
225 }
226
227 fn ccgx_read(&self, reg: ControlRegisters, len: u16) -> EcResult<Vec<u8>> {
228 let mut data: Vec<u8> = Vec::with_capacity(len.into());

Callers 1

ccgx_writeMethod · 0.80

Calls 3

i2c_writeFunction · 0.85
i2c_portMethod · 0.80
i2c_addressMethod · 0.80

Tested by

no test coverage detected