(offset: u16, length: u16)
| 330 | } |
| 331 | |
| 332 | pub 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 | } |
no test coverage detected