| 186 | } |
| 187 | |
| 188 | static void flash_erase(uint32_t addr, uint8_t byte) { |
| 189 | unsigned int i; |
| 190 | (void)addr; |
| 191 | (void)byte; |
| 192 | |
| 193 | mem.flash.command = FLASH_CHIP_ERASE; |
| 194 | |
| 195 | for (i = 0; i < NUM_8K_SECTORS; i++) { |
| 196 | if ((mem.flash.sector8k[i].ipb & mem.flash.sector8k[i].dpb) == 1) { |
| 197 | memset(mem.flash.sector8k[i].ptr, 0xFF, SIZE_FLASH_SECTOR_8K); |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | for (i = 0; i < NUM_SECTORS; i++) { |
| 202 | if ((mem.flash.sector[i].ipb & mem.flash.sector[i].dpb) == 1) { |
| 203 | memset(mem.flash.sector[i].ptr, 0xFF, SIZE_FLASH_SECTOR_64K); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | gui_console_printf("[CEmu] Erased Unlocked Sectors.\n"); |
| 208 | } |
| 209 | |
| 210 | static void flash_erase_sector(uint32_t addr, uint8_t byte) { |
| 211 | unsigned int selected; |
nothing calls this directly
no test coverage detected