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

Function flash_program_dpb

core/mem.c:303–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303static void flash_program_dpb(uint32_t addr, uint8_t byte) {
304 if( mem.flash.command == FLASH_DPB_MODE )
305 {
306 unsigned int selected;
307
308 if (addr < 0x10000) {
309 selected = addr / SIZE_FLASH_SECTOR_8K;
310 mem.flash.sector8k[selected].dpb = byte & 1;
311 } else {
312 selected = addr / SIZE_FLASH_SECTOR_64K;
313 mem.flash.sector[selected].dpb = byte & 1;
314 }
315
316 mem.flash.command = FLASH_WAIT_PB_EXIT;
317 }
318}
319
320static void flash_exit_pb(uint32_t addr, uint8_t byte) {
321 if( mem.flash.command == FLASH_WAIT_PB_EXIT )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected