MCPcopy Create free account
hub / github.com/FrameworkComputer/framework-system / read_memory

Function read_memory

framework_lib/src/chromium_ec/portio.rs:332–342  ·  view source on GitHub ↗
(offset: u16, length: u16)

Source from the content-addressed store, hash-verified

330}
331
332pub fn read_memory(offset: u16, length: u16) -> EcResult<Vec<u8>> {
333 if !init() {
334 return Err(EcError::DeviceError("Failed to initialize".to_string()));
335 }
336
337 if has_mec() {
338 Ok(transfer_read(0, MEC_MEMMAP_OFFSET + offset, length))
339 } else {
340 Ok(transfer_read(NPC_MEMMAP_OFFSET, offset, length))
341 }
342}

Callers 1

read_memoryMethod · 0.70

Calls 3

has_mecFunction · 0.85
initFunction · 0.70
transfer_readFunction · 0.70

Tested by

no test coverage detected