u16 gFlashNumRemainingBytes
void CopyFlashReadRoutineToRam(void *destination)
Copies the byte reader to RAM and installs its Thumb entry point.
Flash memory: erasing, programming and reading sectors.
The flash chips: sector size and count, and each chip type's routines.
const struct FlashType * gFlash
The hardware's I/O registers and their bits, as pret names them.
u16 ProgramFlashSector(u16 sector, u8 *source)
Erases a standard sector and programs bytes until completion or an error.
u16 EraseFlashSector(u16 sector)
Erases one of sixteen sectors, restoring the cartridge wait setting afterward.
u16 ProgramFlashByte(u8 *source, u8 *destination)
Issues a byte-program command and waits for its destination to match.
struct FlashSector sector
u16 wait[2]
Low two bits of REG_WAITCNT.