Structure RTF_MTD
Pointers to the MTD's driver's functions must be contained in a global variable of structure type RTF_MTD declared in Include\Rtfiles.drv:
#define RTFAPI __cdecl
typedef struct {
DWORD TotalBlocks;
DWORD BlockSize;
UINT WindowSize;
} RTF_MTD_FlashInfo;
typedef struct {
UINT Version;
int (RTFAPI * MountDevice)(void * DriveData,
RTF_MTD_FlashInfo * FlashInfo);
int (RTFAPI * ShutDown) (void * DriveData);
void * (RTFAPI * MapWindow) (void * DriveData,
DWORD BlockIndex,
DWORD WindowIndex);
int (RTFAPI * EraseBlock) (void * DriveData,
DWORD BlockIndex);
int (RTFAPI * ProgramData)(void * DriveData,
void * Address,
void * Data,
UINT Length);
} RTF_MTD;
Field RTF_MTD.Version must contain the RTFiles-32 version number (symbol RTFILE_VER).
MTD Device Driver API
Function MountDevice
|