Home |
Function MountDevice |
Function MountDeviceMTD driver function MountDevice is called when a device is mounted by the linear flash disk driver's MountDevice function: int RTFAPI MountDevice(void * DriveData, RTF_MTD_FlashInfo * FlashInfo); ParametersDriveDataPointer to the DeviceData found in the MTDData member of the RTFDrvFlashData structure of the flash device. FlashInfoPointer to a RTF_MTD_FlashInfo structure supplied by the linear flash driver. MountDevice must fill this structure. return valueIf the function succeeds, it returns RTF_NO_ERROR. If it fails, the return value is a negative error code. This function may be called several times. This function should perform all necessary initialization including locating the flash device. FlashInfo->TotalBlocks is the number of erase units to be used for this disk device. FlashInfo->BlockSize is the size of each erase unit in bytes. FlashInfo->WindowSize is the size of the memory window used to map portions of the flash memory into the computer's address space. The value must be at least 512 bytes and at least 1/128th of FlashInfo->BlockSize. It must not be larger than FlashInfo->BlockSize. For flash devices which are completely mapped into the computer's address space, specify FlashInfo->BlockSize as the window size.
|