diff options
author | Revo <projectrevotpp@hotmail.com> | 2021-01-14 17:18:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 17:18:05 -0500 |
commit | c3b81b6ec04d0e29b9bb9cf4c9722daa5f40bfa6 (patch) | |
tree | 2b63a1bd776413c5d9857bc04dc7c068cfdb3a96 /arm9/lib/include/CTRDG_backup.h | |
parent | 588288d30b0e3200219aa0943b3ff5aaa13d2387 (diff) | |
parent | 1fc2021e29935b1b4930203ba7ec1a2b0380d9cb (diff) |
Merge pull request #314 from red031000/master
decompile CTRDG_backup
Diffstat (limited to 'arm9/lib/include/CTRDG_backup.h')
-rw-r--r-- | arm9/lib/include/CTRDG_backup.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arm9/lib/include/CTRDG_backup.h b/arm9/lib/include/CTRDG_backup.h new file mode 100644 index 00000000..d248b7a1 --- /dev/null +++ b/arm9/lib/include/CTRDG_backup.h @@ -0,0 +1,41 @@ +#ifndef POKEDIAMOND_CTRDG_BACKUP_H +#define POKEDIAMOND_CTRDG_BACKUP_H + +#include "nitro/types.h" +#include "CTRDG_flash.h" +#include "CTRDG_task.h" + +typedef struct CTRDGiFlashTypePlusTag +{ + u16 (*CTRDGi_WriteAgbFlashSector)(u16 secNo, u8 *src); + u16 (*CTRDGi_EraseAgbFlashChip)(void); + u16 (*CTRDGi_EraseAgbFlashSector)(u16 secNo); + void (*CTRDGi_WriteAgbFlashSectorAsync)(u16 secNo, u8 *src, CTRDG_TASK_FUNC callback); + void (*CTRDGi_EraseAgbFlashChipAsync)(CTRDG_TASK_FUNC callback); + void (*CTRDGi_EraseAgbFlashSectorAsync)(u16 secNo, CTRDG_TASK_FUNC callback); + u16 (*CTRDGi_PollingSR)(u16 phase, u8 *adr, u16 lastData); + const u16 (*maxtime); + CTRDGFlashType type; +} CTRDGiFlashTypePlus; + +typedef enum +{ + CTRDG_BACKUP_TYPE_FLASH_512K, + CTRDG_BACKUP_TYPE_FLASH_1M, + CTRDG_BACKUP_TYPE_SRAM +} CTRDGBackupType; + +extern const u16 (*ctrdgi_fl_maxtime); + +extern u16 (*CTRDGi_PollingSR)(u16 phase, u8 *adr, u16 lastData); +extern const CTRDGFlashType *AgbFlash; +extern u16 (*CTRDGi_WriteAgbFlashSector)(u16 secNo, u8 *src); +extern u16 (*CTRDGi_EraseAgbFlashChip)(void); +extern u16 (*CTRDGi_EraseAgbFlashSector)(u16 secNo); +extern void (*CTRDGi_WriteAgbFlashSectorAsync)(u16 secNo, u8 *src, CTRDG_TASK_FUNC callback); +extern void (*CTRDGi_EraseAgbFlashChipAsync)(CTRDG_TASK_FUNC callback); +extern void (*CTRDGi_EraseAgbFlashSectorAsync)(u16 secNo, CTRDG_TASK_FUNC callback); + +u16 CTRDG_IdentifyAgbBackup(CTRDGBackupType type); + +#endif //POKEDIAMOND_CTRDG_BACKUP_H |