summaryrefslogtreecommitdiff
path: root/arm9/lib/include
diff options
context:
space:
mode:
authorRevo <projectrevotpp@hotmail.com>2021-03-09 10:54:26 -0500
committerGitHub <noreply@github.com>2021-03-09 10:54:26 -0500
commitd032e35566418f0706c892d7227fe7e5dc8f7f58 (patch)
tree32f4514efda3ef5dc46ce2e3137e2815c9e61627 /arm9/lib/include
parentacbce1c8be2370e6617cdc74eb658f3f5cf8e1ed (diff)
parentbf279cbcd3d541426fd9c82dafeafaf5f479d285 (diff)
Merge pull request #326 from red031000/master
finish CTRDG_flash_AT29LV512
Diffstat (limited to 'arm9/lib/include')
-rw-r--r--arm9/lib/include/CTRDG_backup.h5
-rw-r--r--arm9/lib/include/CTRDG_flash_AT29LV512.h13
2 files changed, 18 insertions, 0 deletions
diff --git a/arm9/lib/include/CTRDG_backup.h b/arm9/lib/include/CTRDG_backup.h
index 272744ad..8b95a7aa 100644
--- a/arm9/lib/include/CTRDG_backup.h
+++ b/arm9/lib/include/CTRDG_backup.h
@@ -8,6 +8,11 @@
#define CTRDG_BACKUP_PHASE_PROGRAM 0x0001
#define CTRDG_BACKUP_PHASE_SECTOR_ERASE 0x0002
#define CTRDG_BACKUP_PHASE_CHIP_ERASE 0x0003
+#define CTRDG_BACKUP_PHASE_PARAMETER_CHECK 0x00ff
+
+#define CTRDG_BACKUP_RESULT_ERROR 0x8000
+
+extern u16 ctrdg_flash_remainder;
typedef struct CTRDGiFlashTypePlusTag
{
diff --git a/arm9/lib/include/CTRDG_flash_AT29LV512.h b/arm9/lib/include/CTRDG_flash_AT29LV512.h
index 908dd6cf..64f3efdb 100644
--- a/arm9/lib/include/CTRDG_flash_AT29LV512.h
+++ b/arm9/lib/include/CTRDG_flash_AT29LV512.h
@@ -6,5 +6,18 @@
u32 CTRDGi_EraseFlashChipCoreAT(CTRDGTaskInfo *arg);
u32 CTRDGi_EraseFlashSectorCoreAT(CTRDGTaskInfo *arg);
+u32 CTRDGi_EraseFlash4KBCoreAT(CTRDGTaskInfo *arg);
+u32 CTRDGi_WriteFlashSectorCoreAT(CTRDGTaskInfo *arg);
+u32 CTRDGi_WriteFlash4KBCoreAT(CTRDGTaskInfo *arg);
+u16 CTRDGi_EraseFlashChipAT(void);
+u16 CTRDGi_EraseFlash4KBAT(u16 l_secNo);
+u16 CTRDGi_WriteFlash4KBAT(u16 l_secNo, u8 *src);
+void CTRDGi_EraseFlashChipAsyncAT(CTRDG_TASK_FUNC callback);
+void CTRDGi_EraseFlash4KBAsyncAT(u16 l_secNo, CTRDG_TASK_FUNC callback);
+void CTRDGi_WriteFlash4KBAsyncAT(u16 l_secNo, u8 *src, CTRDG_TASK_FUNC callback);
+u16 CTRDGi_EraseFlashSectorAT(u16 p_secNo);
+u16 CTRDGi_WriteFlashSectorAT(u16 p_secNo, u8 *src);
+void CTRDGi_EraseFlashSectorAsyncAT(u16 p_secNo, CTRDG_TASK_FUNC callback);
+void CTRDGi_WriteFlashSectorAsyncAT(u16 p_secNo, u8 *src, CTRDG_TASK_FUNC callback);
#endif //POKEDIAMOND_CTRDG_FLASH_AT29LV512_H