mm/include/sys_flashrom.h
Anghelo Carvajal 666cb6ad4a
More header cleanup (#1604)
* low hanging fruits on variables.h

* z_actor functions

* Move RomFile to z64object.h

* Revert "z_actor functions"

This reverts commit aa99967d16.

* yeet

* z64actor_dlftbls.h

* Move object segment declarations to object_table.c

* Move Camera functions

* z64nmi_buff.h

* fix merge

* su_mtx.h, sys_cmpdma.h and sys_initial_check.h

* sys_ucode.h

* sys_flashrom.h

* Remove unnecessary includes

* z64kanfont.h

* flg_set.h

* z64DLF.h

* z64lifemeter.h

* z64path.h

* format

* ObjectOverlay

* bss

* Yeet ObjectOverlay

* review

* review

* format

* bss

* z64font.h
2024-04-25 18:16:47 -07:00

28 lines
742 B
C

#ifndef SYS_FLASHROM_H
#define SYS_FLASHROM_H
#include "ultra64.h"
typedef struct FlashromRequest {
/* 0x00 */ s32 requestType;
/* 0x04 */ s32 response;
/* 0x08 */ void* addr;
/* 0x0C */ s32 pageNum;
/* 0x10 */ s32 pageCount;
/* 0x14 */ OSMesgQueue messageQueue;
} FlashromRequest; // size = 0x2C
#define FLASHROM_REQUEST_WRITE 1
#define FLASHROM_REQUEST_READ 2
#define FLASH_TYPE_MAGIC 0x11118001
s32 SysFlashrom_InitFlash(void);
s32 SysFlashrom_ReadData(void* addr, u32 pageNum, u32 pageCount);
void SysFlashrom_WriteDataAsync(u8* addr, u32 pageNum, u32 pageCount);
s32 SysFlashrom_IsBusy(void);
s32 SysFlashrom_AwaitResult(void);
void SysFlashrom_WriteDataSync(void* addr, u32 pageNum, u32 pageCount);
#endif