MCPcopy Index your code
hub / github.com/FrameworkComputer/framework-system / version_info

Method version_info

framework_lib/src/chromium_ec/mod.rs:329–338  ·  view source on GitHub ↗

Get EC firmware build information

(&self)

Source from the content-addressed store, hash-verified

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

Callers 4

reflashMethod · 0.80
print_versionsFunction · 0.80
compare_versionFunction · 0.80
selftestFunction · 0.80

Calls 1

send_commandMethod · 0.45

Tested by

no test coverage detected