blob: 474ee96f5409b1f66ca70a50b624236bedcc5053 (
plain)
1
2
3
4
5
6
7
8
|
#include "ultra64.h"
#include "PR/os_internal_flash.h"
void osFlashSectorEraseThrough(u32 page_num) {
// start sector erase operation
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_SECTOR_ERASE | page_num);
osEPiWriteIo(&__osFlashHandler, __osFlashHandler.baseAddress | FLASH_CMD_REG, FLASH_CMD_EXECUTE_ERASE);
}
|