(&self, addr: u16, data: &[u8])
| 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()); |
no test coverage detected