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

Function parse_metadata_ccg3

framework_lib/src/ccgx/mod.rs:270–282  ·  view source on GitHub ↗
(buffer: &[u8])

Source from the content-addressed store, hash-verified

268}
269
270fn parse_metadata_ccg3(buffer: &[u8]) -> Option<(u32, u32)> {
271 let buffer = &buffer[CCG3_METADATA_OFFSET..];
272 let (metadata, _) = CyAcdMetadata::read_from_prefix(buffer).ok()?;
273 trace!("Metadata: {:X?}", metadata);
274 if metadata.metadata_valid.get() == METADATA_MAGIC {
275 Some((
276 1 + metadata.boot_last_row.get() as u32,
277 metadata.fw_size.get(),
278 ))
279 } else {
280 None
281 }
282}
283
284//fn parse_metadata(buffer: &[u8; 256]) -> Option<(u32, u32)> {
285fn parse_metadata_cyacd(buffer: &[u8]) -> Option<(u32, u32)> {

Callers 1

read_metadataFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected