| 301 | } |
| 302 | |
| 303 | static 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 | |
| 320 | static void flash_exit_pb(uint32_t addr, uint8_t byte) { |
| 321 | if( mem.flash.command == FLASH_WAIT_PB_EXIT ) |
nothing calls this directly
no outgoing calls
no test coverage detected