Unit MMC
Return to Unit Reference
Description
This unit implements the standards based part of the SD/MMC specification including the standard SDHCI interfaces.
For each platform a SDHCI module needs to be provided that implements the platform specific parts of the SDHCI interface.
This is similar in model to USB and other interfaces in Ultibo, where the generic interface unit requires a platform specific module to register with it in order to communicate with platform specific devices.
The SD/MMC interfaces are 2 tier (ie Host and Device) whereas the USB interface is 3 tier (Host, Device and Driver).
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
procedure MMCInit;
Note | None documented |
---|
function MMCStart:LongWord;
Note | None documented |
---|
function MMCStop:LongWord;
Note | None documented |
---|
procedure MMCAsyncStart(SDHCI:PSDHCIHost);
Note | None documented |
---|
MMC functions
function MMCDeviceReadBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Note | None documented |
---|
function MMCDeviceWriteBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Note | None documented |
---|
function MMCDeviceEraseBlocks(MMC:PMMCDevice; const Start,Count:Int64):LongWord;
Note | None documented |
---|
function MMCDeviceGoIdle(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSetClock(MMC:PMMCDevice; Clock:LongWord):LongWord;
Note | None documented |
---|
function MMCDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
Reference | Section 3.4 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf |
---|
function MMCDeviceSetBlockLength(MMC:PMMCDevice; Length:LongWord):LongWord;
Note | None documented |
---|
function MMCDeviceSetBlockCount(MMC:PMMCDevice; Count:LongWord; Relative:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceSetDriverStage(MMC:PMMCDevice; DriverStage:LongWord):LongWord;
Note | None documented |
---|
function MMCDeviceSelectCard(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDeselectCard(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSwitch(MMC:PMMCDevice; Setting,Index,Value:Byte):LongWord;
Note | None documented |
---|
function MMCDeviceSendCardStatus(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceSendCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendAllCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceGetExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDecodeExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSetRelativeAddress(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSPISetCRC(MMC:PMMCDevice; Enable:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceSPIReadOperationCondition(MMC:PMMCDevice; HighCapacity:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceInsert(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceRemove(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceInitialize(MMC:PMMCDevice):LongWord;
Reference | Section 3.6 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf |
---|
function MMCDeviceDeinitialize(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceGetWriteProtect(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
Note | None documented |
---|
function MMCDeviceSetIOS(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceCreate:PMMCDevice;
Return | Pointer to new MMC entry or nil if MMC could not be created |
---|
function MMCDeviceCreateEx(Size:LongWord):PMMCDevice;
Size | Size in bytes to allocate for new MMC (Including the MMC entry) |
---|---|
Return | Pointer to new MMC entry or nil if MMC could not be created |
function MMCDeviceDestroy(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceRegister(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDeregister(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceFind(MMCId:LongWord):PMMCDevice;
Note | None documented |
---|
function MMCDeviceFindByName(const Name:String):PMMCDevice; inline;
Note | None documented |
---|
function MMCDeviceFindByDescription(const Description:String):PMMCDevice; inline;
Note | None documented |
---|
function MMCDeviceEnumerate(Callback:TMMCEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function MMCDeviceNotification(MMC:PMMCDevice; Callback:TMMCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
Return to Unit Reference