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

Function flash_finish_command

core/flash.c:88–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static void flash_finish_command(void) {
89 flash.commandStatus[0] |= 1 << 0;
90 switch (flash.command[0xF]) {
91 // Reset instructions
92 case 0x04: // Write Disable
93 case 0x01: // Write Status Register-1
94 case 0x31: // Write Status Register-2
95 case 0x11: // Write Status Register-3
96 case 0x02: // Page Program
97 case 0x32: // Quad Input Page Program
98 case 0x20: // Sector Erase
99 case 0x52: // 32KB Block Erase
100 case 0xD8: // 64KB Block Erase
101 case 0xC7: case 0x60: // Chip Erase
102 case 0x44: // Erase Security Registers
103 case 0x42: // Program Security Registers
104 case 0x99: // Reset
105 flash.commandStatus[1] &= ~(1 << 1);
106 break;
107 }
108}
109
110static void flash_erase(uint32_t size) {
111 assert(!(size & (size - 1)));

Callers 3

flash_eraseFunction · 0.85
flash_execute_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected