Get EC firmware build information
(&self)
| 327 | |
| 328 | /// Get EC firmware build information |
| 329 | pub fn version_info(&self) -> EcResult<String> { |
| 330 | // Response is null-terminated string. |
| 331 | let data = self.send_command(EcCommands::GetBuildInfo as u16, 0, &[])?; |
| 332 | Ok(std::str::from_utf8(&data) |
| 333 | .map_err(|utf8_err| { |
| 334 | EcError::DeviceError(format!("Failed to decode version: {:?}", utf8_err)) |
| 335 | })? |
| 336 | .trim_end_matches(char::from(0)) |
| 337 | .to_string()) |
| 338 | } |
| 339 | |
| 340 | pub fn flash_version(&self) -> Option<(String, String, EcCurrentImage)> { |
| 341 | // Unlock SPI |
no test coverage detected