Alchemy
Loading...
Searching...
No Matches

flash_data.h

Go to the documentation of this file.
1#ifndef GUARD_FLASH_DATA_H
2#define GUARD_FLASH_DATA_H
3
4/// @file
5/// The flash chips: sector size and count, and each chip type's routines.
6
7#include "types.h"
8
9typedef u16 (*FlashWaitProc)(u8 timingIndex, volatile u8 *address, u8 expected);
10
11/// Sector size and count.
17};
18
19/// Flash chip type (the 24-byte record pointed to by gFlash).
20struct FlashType {
23 u16 wait[2]; ///< Low two bits of REG_WAITCNT.
25};
26
27/// Settings for each flash chip model (44 bytes), in flash_setup's field order
28/// from flashset.s.
30 u32 handlers[3]; ///< Program, erase all, erase sector.
31 FlashWaitProc wait; ///< Wait for programming to finish.
32 u16 *maxTime; ///< Wait-time table.
34};
35
36extern const struct FlashType *gFlash;
37extern const struct FlashSetupInfo gFlash_ChipUnknown;
40
41#endif
u16(*) FlashWaitProc(u8 timingIndex, volatile u8 *address, u8 expected)
Definition flash_data.h:9
const struct FlashType * gFlash
struct FlashSetupInfo gFlash_ChipAtmel
struct FlashSetupInfo gFlash_ChipAtmelLayout
const struct FlashSetupInfo gFlash_ChipUnknown
Sector size and count.
Definition flash_data.h:12
Settings for each flash chip model (44 bytes), in flash_setup's field order from flashset....
Definition flash_data.h:29
u16 * maxTime
Wait-time table.
Definition flash_data.h:32
FlashWaitProc wait
Wait for programming to finish.
Definition flash_data.h:31
struct FlashType type
Definition flash_data.h:33
u32 handlers[3]
Program, erase all, erase sector.
Definition flash_data.h:30
Flash chip type (the 24-byte record pointed to by gFlash).
Definition flash_data.h:20
struct FlashSector sector
Definition flash_data.h:22
u16 wait[2]
Low two bits of REG_WAITCNT.
Definition flash_data.h:23
u32 romSize
Definition flash_data.h:21
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11