Read a ManufacturerAccess block command by writing the sub-command to register 0x00 and reading the response from 0x44
(&self, ec: &CrosEc, subcmd: u16, max_len: u16)
| 868 | /// Read a ManufacturerAccess block command by writing the sub-command |
| 869 | /// to register 0x00 and reading the response from 0x44 |
| 870 | fn mac_read(&self, ec: &CrosEc, subcmd: u16, max_len: u16) -> EcResult<Vec<u8>> { |
| 871 | self.smbus_write_block(ec, 0x00, &subcmd.to_le_bytes())?; |
| 872 | self.read_block(ec, 0x44, max_len) |
| 873 | } |
| 874 | |
| 875 | /// Authenticate the battery using SHA-1 HMAC challenge-response |
| 876 | pub fn authenticate_battery(&self, ec: &CrosEc, auth_key: &[u8; 16]) -> EcResult<bool> { |
no test coverage detected