MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / flash_program_ipb

Function flash_program_ipb

core/mem.c:284–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284static void flash_program_ipb(uint32_t addr, uint8_t byte) {
285 (void)byte;
286
287 if( mem.flash.command == FLASH_IPB_MODE )
288 {
289 unsigned int selected;
290
291 if (addr < 0x10000) {
292 selected = addr / SIZE_FLASH_SECTOR_8K;
293 mem.flash.sector8k[selected].ipb = 0;
294 } else {
295 selected = addr / SIZE_FLASH_SECTOR_64K;
296 mem.flash.sector[selected].ipb = 0;
297 }
298
299 mem.flash.command = FLASH_WAIT_PB_EXIT;
300 }
301}
302
303static void flash_program_dpb(uint32_t addr, uint8_t byte) {
304 if( mem.flash.command == FLASH_DPB_MODE )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected