summaryrefslogtreecommitdiff
path: root/src/agb_flash_le.c
diff options
context:
space:
mode:
authorsceptillion <33798691+sceptillion@users.noreply.github.com>2017-12-16 23:54:22 -0800
committersceptillion <33798691+sceptillion@users.noreply.github.com>2017-12-16 23:54:22 -0800
commit670fef77ac4d9116d5fdc28c0da40622919a062b (patch)
tree61c0e925f059404473826ac775305ba5e2706ab1 /src/agb_flash_le.c
first commit
Diffstat (limited to 'src/agb_flash_le.c')
-rw-r--r--src/agb_flash_le.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/agb_flash_le.c b/src/agb_flash_le.c
new file mode 100644
index 000000000..39d956e27
--- /dev/null
+++ b/src/agb_flash_le.c
@@ -0,0 +1,31 @@
+#include "gba/gba.h"
+#include "gba/flash_internal.h"
+
+const u16 leMaxTime[] =
+{
+ 10, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK,
+ 10, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK,
+ 2000, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK,
+ 2000, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK,
+};
+
+const struct FlashSetupInfo LE26FV10N1TS =
+{
+ ProgramFlashByte_MX,
+ ProgramFlashSector_MX,
+ EraseFlashChip_MX,
+ EraseFlashSector_MX,
+ WaitForFlashWrite_Common,
+ leMaxTime,
+ {
+ 131072, // ROM size
+ {
+ 4096, // sector size
+ 12, // bit shift to multiply by sector size (4096 == 1 << 12)
+ 32, // number of sectors
+ 0 // appears to be unused
+ },
+ { 3, 1 }, // wait state setup data
+ { { 0x62, 0x13 } } // ID
+ }
+};