Unit MMC

From Ultibo.org
Jump to: navigation, search

Return to Unit Reference


Description


Ultibo MMC/SD/SDIO Interface unit

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.

A fully standards compliant SDHCI host controller needs only a procedure to register it with the SD/MMC core and it can operate using the standard functions provided in this unit, any deviations from the standard will require custom functions to be provided to override the standard functionality.

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 normally 2 tier (ie Host and Device) whereas the USB interface is 3 tier (Host, Device and Driver) however SDIO support adds a driver model to encapsulate support for device functions which can provide a variety of functionality including WiFi, Bluetooth, Ethernet and others.

Constants



[Expand]
MMC specific constants MMC_*


[Expand]
MMC device type MMC_TYPE_*


[Expand]
MMC device state MMC_STATE_*


[Expand]
MMC device flag MMC_FLAG_*


[Expand]
MMC/SD status code MMC_STATUS_*


[Expand]
MMC/SD/SDIO version SDIO_VERSION_*, SD_VERSION_*, MMC_VERSION_*


[Expand]
MMC/SD capabilities MMC_CAP_*


[Expand]
MMC/SD capabilities2 MMC_CAP2_*


[Expand]
MMC/SD direction MMC_DATA_*


[Expand]
MMC/SD bus width MMC_BUS_WIDTH_*


[Expand]
MMC bus speed (Hz) MMC_BUS_SPEED_*


[Expand]
MMC/SD timing MMC_TIMING_*


[Expand]
MMC/SD signal voltage MMC_SIGNAL_VOLTAGE_*


[Expand]
MMC/SD set driver type MMC_SET_DRIVER_TYPE_*


[Expand]
MMC command MMC_CMD_*


[Expand]
MMC response type MMC_RSP_*


[Expand]
MMC non-SPI command MMC_CMD_*


[Expand]
MMC SPI response type MMC_RSP_SPI_*


[Expand]
MMC response value MMC_RSP_R1_*, MMC_RSP_R2_*


[Expand]
MMC operation condition register (OCR) value MMC_OCR_*


[Expand]
MMC card status register (CSR) value MMC_CARD_STATUS_*


[Expand]
MMC current state value MMC_CURRENT_STATE_*


[Expand]
MMC card identification data (CID) value MMC_CID_*


[Expand]
MMC card specific data (CSD) value MMC_CSD_*


[Expand]
MMC CSD structure value MMC_CSD_STRUCT_*


[Expand]
MMC CSD spec version value MMC_CSD_SPEC_VER_*


[Expand]
MMC CSD TAAC time unit MMC_CSD_TAAC_UNITS*


[Expand]
MMC CSD TAAC time value MMC_CSD_TAAC_VALUES*


[Expand]
MMC CSD card command class (CCC) value MMC_CCC_*


[Expand]
MMC CSD transfer speed rate unit MMC_CSD_TRAN_SPEED_UNITS*


[Expand]
MMC CSD transfer speed time value MMC_CSD_TRAN_SPEED_VALUES*


[Expand]
MMC voltage value MMC_VDD_*


[Expand]
MMC switch mode value MMC_SWITCH_MODE_*


[Expand]
MMC EXT_CSD field EXT_CSD_*


[Expand]
MMC EXT_CSD field definition EXT_CSD_*


[Expand]
MMC EXT_CSD exception event status field EXT_CSD_*


[Expand]
MMC EXT_CSD BKOPS status level EXT_CSD_BKOPS_*


[Expand]
MMC EXT_CSD BKOPS mode EXT_CSD_*_BKOPS_


[Expand]
MMC EXT_CSD command queue EXT_CSD_CMDQ_*


[Expand]
MMC EXT_CSD high speed max MMC_HIGH_*


[Expand]
MMC EXT_CSD minimum partition switch timeout MMC_MIN_PART_*


[Expand]
MMC miscellaneous MMCPART_*, MMC_MAX_*


[Expand]
MMC logging MMC_LOG_*


[Expand]
SD specific constants SD_*


[Expand]
SD bus width SD_BUS_WIDTH_*


[Expand]
SD bus speed (Hz) SD_BUS_SPEED_*


[Expand]
SD command SD_CMD_*


[Expand]
SD switch mode value SD_SWITCH_MODE_*


[Expand]
SD switch function group SD_SWITCH_FUNCTION_GROUP_*


[Expand]
SD switch access mode SD_SWITCH_ACCESS_MODE_*


[Expand]
SD switch command system SD_SWITCH_COMMAND_SYSTEM_*


[Expand]
SD switch driver strength SD_SWITCH_DRIVER_STRENGTH_*


[Expand]
SD switch power limit SD_SWITCH_POWER_LIMIT_*


[Expand]
SD send interface condition value SD_SEND_IF_COND_*


[Expand]
SD send operation condition value SD_SEND_OP_COND_*


[Expand]
SD operation condition register value SD_OCR_*


[Expand]
SD CSD structure value SD_CSD_STRUCT_*


[Expand]
SD status register (SSR) value SD_SSR_*


[Expand]
SD SSR bus width value SD_SSR_BUS_WIDTH_*


[Expand]
SD SSR card type value SD_SSR_CARD_TYPE_*


[Expand]
SD SSR speed class value SD_SSR_SPEED_CLASS_*


[Expand]
SD SSR AU size value SD_SSR_AU_SIZE_*


[Expand]
SD SSR UHS speed grade value SD_SSR_UHS_SPEED_*


[Expand]
SD SSR UHS AU size value SD_SSR_UHS_AU_SIZE_*


[Expand]
SD switch status value SD_SWITCH_*


[Expand]
SD configuration register (SCR) value SD_SCR_*


[Expand]
SD SCR structure value SD_SCR_STRUCT_*


[Expand]
SD SCR spec version value SD_SCR_SPEC_VER_*


[Expand]
SD SCR security value SD_SCR_SECURITY_*


[Expand]
SD SCR bus width value SD_SCR_BUS_WIDTH_*


[Expand]
SD SCR extended security value SD_SCR_EX_SECURITY_*


[Expand]
SD SCR command support value SD_SCR_*_SUPPORT


[Expand]
SDIO function state SDIO_STATE_*


[Expand]
SDIO function state name SDIO_STATE_*


[Expand]
SDIO function status SDIO_STATUS_*


[Expand]
SDIO function status name SDIO_STATUS_*


[Expand]
SDIO command SDIO_CMD_*


[Expand]
SDIO response value SDIO_RSP_*


[Expand]
SDIO card common control registers (CCCR) SDIO_CCCR_*


[Expand]
SDIO revision SDIO_*_REV_*


[Expand]
SDIO bus width SDIO_BUS_*


[Expand]
SDIO CCCR caps register value SDIO_CCCR_CAP_*


[Expand]
SDIO CCCR power register value SDIO_POWER_*


[Expand]
SDIO CCCR speed register value SDIO_SPEED_*


[Expand]
SDIO CCCR UHS register value SDIO_UHS_*


[Expand]
SDIO CCCR drive strength register value SDIO_DRIVE_*


[Expand]
SDIO function basic register (FBR) SDIO_FBR_*


[Expand]
SDIO function class SDIO_CLASS_*


[Expand]
SDIO vendor SDIO_VENDOR_*


[Expand]
SDIO device SDIO_DEVICE_*


[Expand]
SDIO CIS tuple code CISTPL_*


[Expand]
SDHCI specific constants SDHCI_*


[Expand]
SDHCI host type SDHCI_TYPE_*


[Expand]
SDHCI host state SDHCI_STATE_*


[Expand]
SDHCI host flag SDHCI_FLAG_*


[Expand]
SDHCI controller register SDHCI_DMA_*, SDHCI_BLOCK_*


[Expand]
SDHCI transfer mode SDHCI_TRNS_*


[Expand]
SDHCI command value SDHCI_CMD_*


[Expand]
SDHCI command response value SDHCI_CMD_RESP_*


[Expand]
SDHCI present state value SDHCI_DATA_*, SDHCI_CARD_*


[Expand]
SDHCI host control value SDHCI_CTRL_*


[Expand]
SDHCI power control value SDHCI_POWER_*


[Expand]
SDHCI wakeup control value SDHCI_WAKE_*


[Expand]
SDHCI clock control value SDHCI_CLOCK_*


[Expand]
SDHCI software reset value SDHCI_RESET_*


[Expand]
SDHCI interrupt value SDHCI_INT_*


[Expand]
SDHCI auto CMD status value SDHCI_AUTO_CMD_*


[Expand]
SDHCI host control 2 value SDHCI_CTRL_*


[Expand]
SDHCI capabilities value SDHCI_*_MASK*, SDHCI_*SHIFT


[Expand]
SDHCI capabilities 1 value SDHCI_SUPPORT_*


[Expand]
SDHCI max current value SDHCI_MAX_CURRENT_*


[Expand]
SDHCI preset value SDHCI_PRESET_*


[Expand]
SDHCI host version value SDHCI_*_VER_*


[Expand]
SDHCI clock divider SDHCI_MAX_CLOCK_DIV_*


[Expand]
SDHCI quirks/bug SDHCI_QUIRK*


[Expand]
SDHCI host SDMA buffer boundary SDHCI_DEFAULT_BOUNDARY_*


[Expand]
SDHCI ADMA2 32-bit DMA descriptor size SDHCI_ADMA2_32_DESC_SIZE*


[Expand]
SDHCI ADMA2 data alignment SDHCI_ADMA2_ALIGN*


[Expand]
SDHCI ADMA2 descriptor alignment SDHCI_ADMA2_DESC_ALIGN*


[Expand]
SDHCI ADMA2 64-bit DMA descriptor size SDHCI_ADMA2_64_DESC_SIZE*


[Expand]
SDHCI ADMA2 descriptor attributes SDHCI_ADMA2_DESC_ATTR_*


[Expand]
SDHCI maximum segments SDHCI_MAX_SEGS*


[Expand]
SDHCI timeout value SDHCI_TIMEOUT_VALUE*


Type definitions



MMC command

[Expand]

PMMCCommand = ^TMMCCommand;

TMMCCommand = record

MMC data

[Expand]

PMMCData = ^TMMCData;

TMMCData = record

MMC card identification data (CID)

[Expand]

PMMCCardIdentificationData = ^TMMCCardIdentificationData;

TMMCCardIdentificationData = record

MMC card specific erase data (CSD)

[Expand]

TMMCCardSpecificSDEraseData = record

MMC card specific MMC22 erase data

[Expand]

TMMCCardSpecificMMC22EraseData = record

MMC card specific MMC31 erase data

[Expand]

TMMCCardSpecificMMC31EraseData = record

MMC card specific erase data

[Expand]

TMMCCardSpecificEraseData = record

MMC card specific data

[Expand]

PMMCCardSpecificData = ^TMMCCardSpecificData;

TMMCCardSpecificData = record

MMC extended card specific data

[Expand]

PMMCExtendedCardSpecificData = ^TMMCExtendedCardSpecificData;

TMMCExtendedCardSpecificData = record

SD status data (SSR)

[Expand]

PSDStatusData = ^TSDStatusData;

TSDStatusData = record

SD switch data

[Expand]

PSDSwitchData = ^TSDSwitchData;

TSDSwitchData = record

SD configuration data (SCR)

[Expand]

PSDConfigurationData = ^TSDConfigurationData;

TSDConfigurationData = record

MMC device types

[Expand]

PMMCDevice = ^TMMCDevice;

TMMCDevice = record

MMC enumeration callback

TMMCEnumerate = function(MMC:PMMCDevice; Data:Pointer):LongWord;

MMC notification callback

TMMCNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

MMC device initialize

TMMCDeviceInitialize = function(MMC:PMMCDevice):LongWord;

MMC device deinitialize

TMMCDeviceDeinitialize = function(MMC:PMMCDevice):LongWord;

MMC device get card detect

TMMCDeviceGetCardDetect = function(MMC:PMMCDevice):LongWord;

MMC device get write protect

TMMCDeviceGetWriteProtect = function(MMC:PMMCDevice):LongWord;

MMC device send command

TMMCDeviceSendCommand = function(MMC:PMMCDevice; Command:PMMCCommand):LongWord;

MMC device set IOS

TMMCDeviceSetIOS = function(MMC:PMMCDevice):LongWord;

SDIO CCCR

[Expand]

PSDIOCCCR = ^TSDIOCCCR;

TSDIOCCCR = record

SDIO CIS

[Expand]

PSDIOCIS = ^TSDIOCIS;

TSDIOCIS = record

SDIO tuple

[Expand]

PSDIOTuple = ^TSDIOTuple;

TSDIOTuple = record

SDIO function interrupt handler

TSDIOInterruptHandler = procedure(Func:PSDIOFunction);

SDIO function enumeration callback

TSDIOFunctionEnumerate = function(Func:PSDIOFunction; Data:Pointer):LongWord;

SDIO function

[Expand]

FSDIOFunction = ^TSDIOFunction;

TSDIOFunction = record

SDIO driver enumeration callback

TSDIODriverEnumerate = function(Driver:PSDIODriver;Data:Pointer):LongWord;

SDIO driver bind callback

TSDIODriverBind = function(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;

SDIO driver unbind callback

TSDIODriverUnbind = function(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;

SDIO driver

[Expand]

PSDIODriver = ^TSDIODriver;

TSDIODriver = record

SDHCI ADMA2 32-bit descriptor

[Expand]

PSDHCIADMA2Descriptor32 = ^TSDHCIADMA2Descriptor32;

TSDHCIADMA2Descriptor32 = packed record

SDHCI ADMA2 64-bit descriptor

[Expand]

PSDHCIADMA2Descriptor64 = ^TSDHCIADMA2Descriptor64;

TSDHCIADMA2Descriptor64 = packed record

SDHCI ADMA2 64-bit V4 descriptor

[Expand]

PSDHCIADMA2Descriptor64v4 = ^TSDHCIADMA2Descriptor64v4;

TSDHCIADMA2Descriptor64v4 = packed record

SDHCI host types

[Expand]

PSDHCIHost = ^TSDHCIHost;

TSDHCIHost = record

SDHCI enumeration callback

TSDHCIEnumerate = function(SDHCI:PSDHCIHost; Data:Pointer):LongWord;

SDHCI notification callback

TSDHCINotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

SDHCI host start

TSDHCIHostStart = function(SDHCI:PSDHCIHost):LongWord;

SDHCI host stop

TSDHCIHostStop = function(SDHCI:PSDHCIHost):LongWord;

SDHCI host lock

TSDHCIHostLock = function(SDHCI:PSDHCIHost):LongWord;

SDHCI host unlock

TSDHCIHostUnlock = function(SDHCI:PSDHCIHost):LongWord;

SDHCI host signal

TSDHCIHostSignal = function(SDHCI:PSDHCIHost; Semaphore:TSemaphoreHandle):LongWord;

SDHCI host read byte

TSDHCIHostReadByte = function(SDHCI:PSDHCIHost; Reg:LongWord):Byte;

SDHCI host read word

TSDHCIHostReadWord = function(SDHCI:PSDHCIHost; Reg:LongWord):Word;

SDHCI host read long

TSDHCIHostReadLong = function(SDHCI:PSDHCIHost; Reg:LongWord):LongWord;

SDHCI host write byte

TSDHCIHostWriteByte = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte);

SDHCI host write word

TSDHCIHostWriteWord = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word);

SDHCI host write long

TSDHCIHostWriteLong = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord);

SDHCI host reset

TSDHCIHostReset = function(SDHCI:PSDHCIHost; Mask:Byte):LongWord;

SDHCI host hardware reset

TSDHCIHostHardwareReset = function(SDHCI:PSDHCIHost):LongWord;

SDHCI host set power

TSDHCIHostSetPower = function(SDHCI:PSDHCIHost; Power:Word):LongWord;

SDHCI host set clock

TSDHCIHostSetClock = function(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;

SDHCI host set timing

TSDHCIHostSetTiming = function(SDHCI:PSDHCIHost; Timing:LongWord):LongWord;

SDHCI host bus width

TSDHCIHostSetBusWidth = function(SDHCI:PSDHCIHost; BusWidth:LongWord):LongWord;

SDHCI host set clock divider

TSDHCIHostSetClockDivider = function(SDHCI:PSDHCIHost; Index:Integer; Divider:LongWord):LongWord;

SDHCI host set control register

TSDHCIHostSetControlRegister = function(SDHCI:PSDHCIHost):LongWord;

SDHCI host prepare DMA

TSDHCIHostPrepareDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;

SDHCI host start DMA

TSDHCIHostStartDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;

SDHCI host stop DMA

TSDHCIHostStopDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;

SDHCI host setup card IRQ

TSDHCIHostSetupCardIRQ = function(SDHCI:PSDHCIHost; Enable:LongBool):LongWord;

SDHCI host complete card IRQ

TSDHCIHostCompleteCardIRQ = function(SDHCI:PSDHCIHost):LongWord;


Function declarations



Initialization functions

[Expand]
procedure MMCInit;
Description: Performs basic initialization of the MMC/SD core, after this devices, hosts and drivers can be registered however nothing will work until MMCStart is called


[Expand]
function MMCStart:LongWord;
Description: To be documented


[Expand]
function MMCStop:LongWord;
Description: To be documented


[Expand]
procedure MMCAsyncStart(SDHCI:PSDHCIHost);
Description: To be documented


MMC functions

[Expand]
function MMCDeviceReadBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function MMCDeviceWriteBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function MMCDeviceEraseBlocks(MMC:PMMCDevice; const Start,Count:Int64):LongWord;
Description: To be documented


[Expand]
function MMCDeviceGoIdle(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetClock(MMC:PMMCDevice; Clock:LongWord):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetTiming(MMC:PMMCDevice; Timing:LongWord):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetBlockLength(MMC:PMMCDevice; Length:LongWord):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetBlockCount(MMC:PMMCDevice; Count:LongWord; Relative:Boolean):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetDriverStage(MMC:PMMCDevice; DriverStage:LongWord):LongWord;
Description: To be documented


[Expand]
function MMCDeviceStopTransmission(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSelectCard(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceDeselectCard(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSwitch(MMC:PMMCDevice; Setting,Index,Value:Byte; Timeout:LongWord):LongWord;
Description: Modifies an Extended CSD register for the specificed MMC device


[Expand]
function MMCDeviceSwitchEx(MMC:PMMCDevice; Setting,Index,Value:Byte; Timeout,Timing:LongWord; SendStatus,RetryCRCError:Boolean):LongWord;
Description: Modifies an Extended CSD register for the specificed MMC device


[Expand]
function MMCDevicePollForBusy(MMC:PMMCDevice; Timeout,Command:LongWord):LongWord;
Description: Poll the specified MMC device for command completion using busy status


[Expand]
function MMCDevicePollForBusyEx(MMC:PMMCDevice; Timeout,Command:LongWord; SendStatus,RetryCRCError:Boolean):LongWord;
Description: Poll the specified MMC device for command completion using busy status


[Expand]
function MMCDeviceSendCardStatus(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSendCardSpecific(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
Description: Given a 128-bit response, decode to our card CSD structure


[Expand]
function MMCDeviceSendCardIdentification(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSendAllCardIdentification(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;
Description: Given a 128-bit response, decode to our card CID structure


[Expand]
function MMCDeviceGetExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSendExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceDecodeExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetRelativeAddress(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSPISetCRC(MMC:PMMCDevice; Enable:Boolean):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSPIReadOperationCondition(MMC:PMMCDevice; HighCapacity:Boolean):LongWord;
Description: To be documented


[Expand]
function MMCDeviceInsert(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceRemove(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceInitialize(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceDeinitialize(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceGetWriteProtect(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSendCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
Description: To be documented


[Expand]
function MMCDeviceSetIOS(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function MMCDeviceCreate:PMMCDevice;
Description: Create a new MMC entry


[Expand]
function MMCDeviceCreateEx(Size:LongWord):PMMCDevice;
Description: Create a new MMC entry


[Expand]
function MMCDeviceDestroy(MMC:PMMCDevice):LongWord;
Description: Destroy an existing MMC entry


[Expand]
function MMCDeviceRegister(MMC:PMMCDevice):LongWord;
Description: Register a new MMC in the MMC table


[Expand]
function MMCDeviceDeregister(MMC:PMMCDevice):LongWord;
Description: Deregister a MMC from the MMC table


[Expand]
function MMCDeviceFind(MMCId:LongWord):PMMCDevice;
Description: To be documented


[Expand]
function MMCDeviceFindByDevice(Device:PDevice):PMMCDevice;
Description: Find an MMC/SD device by the matching DeviceData property


[Expand]
function MMCDeviceFindByName(const Name:String):PMMCDevice; inline;
Description: To be documented


[Expand]
function MMCDeviceFindByDescription(const Description:String):PMMCDevice; inline;
Description: To be documented


[Expand]
function MMCDeviceEnumerate(Callback:TMMCEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function MMCDeviceNotification(MMC:PMMCDevice; Callback:TMMCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


SD functions

[Expand]
function SDDeviceSwitch(MMC:PMMCDevice; Mode,Group:Integer; Value:Byte; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function SDDeviceSwitchHighspeed(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
Description: To be documented


[Expand]
function SDDeviceSendInterfaceCondition(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Description: To be documented


[Expand]
function SDDeviceGetCardSpecific(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
Description: Given a 128-bit response, decode to our card CSD structure


[Expand]
function SDDeviceGetCardIdentification(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;
Description: Given a 128-bit response, decode to our card CID structure


[Expand]
function SDDeviceSendSDStatus(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceDecodeSDStatus(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceSendSDSwitch(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceDecodeSDSwitch(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceSendSDConfiguration(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceDecodeSDConfiguration(MMC:PMMCDevice):LongWord;
Description: Given a 64-bit response, decode to our card SCR structure


[Expand]
function SDDeviceSendRelativeAddress(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDDeviceSendApplicationCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
Description: To be documented


SDIO functions

[Expand]
function SDIODeviceReset(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDIODeviceEnableWideBus(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDIODeviceDisableWideBus(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDIODeviceEnableHighspeed(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDIODeviceSwitchHighspeed(MMC:PMMCDevice; Enable:Boolean):LongWord;
Description: To be documented


[Expand]
function SDIODeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Description: To be documented


[Expand]
function SDIODeviceReadWriteDirect(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Input:Byte; Output:PByte):LongWord;
Description: To be documented


[Expand]
function SDIODeviceReadWriteExtended(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Increment:Boolean; Buffer:Pointer; BlockCount,BlockSize:LongWord):LongWord;
Description: To be documented


[Expand]
function SDIODeviceReadByte(MMC:PMMCDevice; Address:LongWord; Output:PByte):LongWord;
Description: Wrapper for reading a single byte from Function 0


[Expand]
function SDIODeviceWriteByte(MMC:PMMCDevice; Address:LongWord; Input:Byte):LongWord;
Description: Wrapper for writing a single byte to Function 0


[Expand]
function SDIODeviceReadCCCR(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDIODeviceReadFBR(Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIODeviceReadCIS(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIODeviceReadCommonCIS(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDIODeviceReadFunctionCIS(Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIODeviceProcessInterrupts(MMC:PMMCDevice):LongWord;
Description: To be documented


[Expand]
function SDIODeviceRegisterInterrupt(MMC:PMMCDevice; Func:PSDIOFunction; Handler:TSDIOInterruptHandler):LongWord;
Description: To be documented


[Expand]
function SDIODeviceDeregisterInterrupt(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIODeviceBindFunctions(MMC:PMMCDevice):LongWord;
Description: Attempt to bind SDIO functions on an MMC device to one of the registered drivers


[Expand]
function SDIODeviceUnbindFunctions(MMC:PMMCDevice; Driver:PSDIODriver):LongWord;
Description: Unbind SDIO functions on an MMC device from a driver


[Expand]
function SDIOFunctionAllocate(MMC:PMMCDevice; Number:LongWord):PSDIOFunction;
Description: To be documented


[Expand]
function SDIOFunctionRelease(Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionFind(MMC:PMMCDevice; Number:LongWord):PSDIOFunction;
Description: To be documented


[Expand]
function SDIOFunctionFindById(MMC:PMMCDevice; VendorId,DeviceId:Word):PSDIOFunction;
Description: To be documented


[Expand]
function SDIOFunctionEnumerate(MMC:PMMCDevice; Callback:TSDIOFunctionEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionBind(Func:PSDIOFunction; Driver:PSDIODriver):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionUnbind(Func:PSDIOFunction; Driver:PSDIODriver):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionEnable(Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionDisable(Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionSetBlockSize(Func:PSDIOFunction; BlockSize:LongWord):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionReadWriteExtended(Func:PSDIOFunction; Write:Boolean; Address:LongWord; Increment:Boolean; Buffer:Pointer; Size:LongWord):LongWord;
Description: Perform an SDIO read or write to the specified function at the specified address


[Expand]
function SDIOFunctionRead(Func:PSDIOFunction; Address:LongWord; Buffer:Pointer; Size:LongWord):LongWord;
Description: Wrapper for reading multiple bytes from an SDIO function


[Expand]
function SDIOFunctionWrite(Func:PSDIOFunction; Address:LongWord; Buffer:Pointer; Size:LongWord):LongWord;
Description: Wrapper for writing multiple bytes to an SDIO function


[Expand]
function SDIOFunctionReadByte(Func:PSDIOFunction; Address:LongWord; Output:PByte):LongWord;
Description: Wrapper for reading a single byte from an SDIO function


[Expand]
function SDIOFunctionWriteByte(Func:PSDIOFunction; Address:LongWord; Input:Byte):LongWord;
Description: Wrapper for writing a single byte to an SDIO function


[Expand]
function SDIOFunctionWriteReadByte(Func:PSDIOFunction; Address:LongWord; Input:Byte; Output:PByte):LongWord;
Description: Wrapper for performing a read after write (RAW) operation on an SDIO function


[Expand]
function SDIOFunctionReadWord(Func:PSDIOFunction; Address:LongWord; Output:PWord):LongWord;
Description: Wrapper for reading a single word from an SDIO function


[Expand]
function SDIOFunctionWriteWord(Func:PSDIOFunction; Address:LongWord; Input:Word):LongWord;
Description: Wrapper for writing a single word to an SDIO function


[Expand]
function SDIOFunctionReadLong(Func:PSDIOFunction; Address:LongWord; Output:PLongWord):LongWord;
Description: Wrapper for reading a single longword from an SDIO function


[Expand]
function SDIOFunctionWriteLong(Func:PSDIOFunction; Address:LongWord; Input:LongWord):LongWord;
Description: Wrapper for writing a single longword to an SDIO function


[Expand]
function SDIOFunctionRegisterInterrupt(Func:PSDIOFunction; Handler:TSDIOInterruptHandler):LongWord;
Description: To be documented


[Expand]
function SDIOFunctionDeregisterInterrupt(Func:PSDIOFunction):LongWord;
Description: To be documented


[Expand]
function SDIOHostDispatchInterrupt(SDHCI:PSDHCIHost; IRQ,FIQ:Boolean):LongWord;
Description: To be documented


SDHCI driver functions

[Expand]
function SDIODriverCreate:PSDIODriver;
Description: Create a new SDIO Driver entry


[Expand]
function SDIODriverCreateEx(Size:LongWord):PSDIODriver;
Description: Create a new SDIO Driver entry


[Expand]
function SDIODriverDestroy(Driver:PSDIODriver):LongWord;
Description: Destroy an existing SDIO Driver entry


[Expand]
function SDIODriverRegister(Driver:PSDIODriver):LongWord;
Description: Register a new Driver in the SDIO Driver table


[Expand]
function SDIODriverDeregister(Driver:PSDIODriver):LongWord;
Description: Deregister a Driver from the SDIO Driver table


[Expand]
function SDIODriverFind(DriverId:LongWord):PSDIODriver;
Description: Find a driver by Id in the SDIO Driver table


[Expand]
function SDIODriverFindByName(const Name:String):PSDIODriver; inline;
Description: Find a driver by name in the Driver table


[Expand]
function SDIODriverEnumerate(Callback:TSDIODriverEnumerate;Data:Pointer):LongWord;
Description: To be documented


SDHCI functions

[Expand]
function SDHCIHostReset(SDHCI:PSDHCIHost; Mask:Byte):LongWord;
Description: Default software reset function for SDHCI host controllers


[Expand]
function SDHCIHostHardwareReset(SDHCI:PSDHCIHost):LongWord;
Description: Default hardware reset function for SDHCI host controllers


[Expand]
function SDHCIHostSetPower(SDHCI:PSDHCIHost; Power:Word):LongWord;
Description: Default set power function for SDHCI host controllers


[Expand]
function SDHCIHostSetClock(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;
Description: Default set clock function for SDHCI host controllers


[Expand]
function SDHCIHostSetTiming(SDHCI:PSDHCIHost; Timing:LongWord):LongWord;
Description: Default set timing function for SDHCI host controllers


[Expand]
function SDHCIHostSetBusWidth(SDHCI:PSDHCIHost; BusWidth:LongWord):LongWord;
Description: Default set bus width function for SDHCI host controllers


[Expand]
function SDHCIHostPrepareDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
Description: Default DMA transfer prepare function for SDHCI host controllers


[Expand]
function SDHCIHostStartDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
Description: Default DMA transfer start function for SDHCI host controllers


[Expand]
function SDHCIHostStopDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
Description: Default DMA transfer stop function for SDHCI host controllers


[Expand]
procedure SDHCIHostCompleteDMA(Request:PDMARequest);
Description: Default DMA request completion callback for SDHCI host controllers


[Expand]
function SDHCIHostSetupCardIRQ(SDHCI:PSDHCIHost; Enable:LongBool):LongWord;
Description: Default Card IRQ setup function for SDHCI host controllers


[Expand]
function SDHCIHostCompleteCardIRQ(SDHCI:PSDHCIHost):LongWord;
Description: Default Card IRQ completion function for SDHCI host controllers


[Expand]
function SDHCIHostTransferPIO(SDHCI:PSDHCIHost):LongWord;
Description: Default PIO transfer function for SDHCI host controllers


[Expand]
function SDHCIHostTransferDMA(SDHCI:PSDHCIHost):LongWord;
Description: Default DMA transfer function for SDHCI host controllers


[Expand]
function SDHCIHostFinishCommand(SDHCI:PSDHCIHost):LongWord;
Description: Default finish command function for SDHCI host controllers


[Expand]
function SDHCIHostFinishData(SDHCI:PSDHCIHost):LongWord;
Description: Default finish data function for SDHCI host controllers


[Expand]
function SDHCIHostCommandInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord; var ReturnMask:LongWord):LongWord;
Description: Default command interrupt processing function for SDHCI host controllers


[Expand]
function SDHCIHostDataInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord):LongWord;
Description: Default data interrupt processing function for SDHCI host controllers


[Expand]
function SDHCIHostStart(SDHCI:PSDHCIHost):LongWord;
Description: Default host start function for SDHCI host controllers


[Expand]
function SDHCIHostStop(SDHCI:PSDHCIHost):LongWord;
Description: Default host stop function for SDHCI host controllers


[Expand]
function SDHCIHostLock(SDHCI:PSDHCIHost):LongWord; inline;
Description: Default host lock function for SDHCI host controllers


[Expand]
function SDHCIHostUnlock(SDHCI:PSDHCIHost):LongWord; inline;
Description: Default host unlock function for SDHCI host controllers


[Expand]
function SDHCIHostSignal(SDHCI:PSDHCIHost; Semaphore:TSemaphoreHandle):LongWord; inline;
Description: Default host semaphore signal function for SDHCI host controllers


[Expand]
function SDHCIHostReadByte(SDHCI:PSDHCIHost; Reg:LongWord):Byte; inline;
Description: Default read byte function for SDHCI host controllers


[Expand]
function SDHCIHostReadWord(SDHCI:PSDHCIHost; Reg:LongWord):Word; inline;
Description: Default read word function for SDHCI host controllers


[Expand]
function SDHCIHostReadLong(SDHCI:PSDHCIHost; Reg:LongWord):LongWord; inline;
Description: Default read longword function for SDHCI host controllers


[Expand]
procedure SDHCIHostWriteByte(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte); inline;
Description: Default write byte function for SDHCI host controllers


[Expand]
procedure SDHCIHostWriteWord(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word); inline;
Description: Default write word function for SDHCI host controllers


[Expand]
procedure SDHCIHostWriteLong(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord); inline;
Description: Default write longword function for SDHCI host controllers


[Expand]
function SDHCIHostSetClockDivider(SDHCI:PSDHCIHost; Index:Integer; Divider:LongWord):LongWord;
Description: Default set clock divider function for SDHCI host controllers


[Expand]
function SDHCIHostSetControlRegister(SDHCI:PSDHCIHost):LongWord;
Description: Default set control register function for SDHCI host controllers


[Expand]
function SDHCIHostGetADMAAddress(SDHCI:PSDHCIHost):PtrUInt;
Description: Get the DMA address of the ADMA table for the current request


[Expand]
procedure SDHCIHostSetADMAAddress(SDHCI:PSDHCIHost; Address:PtrUInt);
Description: Set the address of the transfer data in the Advanced DMA (ADMA) registers


[Expand]
function SDHCIHostGetSDMAAddress(SDHCI:PSDHCIHost; Command:PMMCCommand):PtrUInt;
Description: Get the DMA address of the transfer data for the current request


[Expand]
procedure SDHCIHostSetSDMAAddress(SDHCI:PSDHCIHost; Address:PtrUInt);
Description: Set the address of the transfer data in the Simple DMA (SDMA) register


[Expand]
procedure SDHCIHostWriteADMADescriptor(SDHCI:PSDHCIHost; var Descriptor:Pointer; Command,Len:Word; Address:PtrUInt);
Description: Write the properties to an ADMA descriptor


[Expand]
function SDHCIHostCreate:PSDHCIHost;
Description: Create a new SDHCI entry


[Expand]
function SDHCIHostCreateEx(Size:LongWord):PSDHCIHost;
Description: Create a new SDHCI entry


[Expand]
function SDHCIHostDestroy(SDHCI:PSDHCIHost):LongWord;
Description: Destroy an existing SDHCI entry


[Expand]
function SDHCIHostRegister(SDHCI:PSDHCIHost):LongWord;
Description: Register a new SDHCI in the SDHCI table


[Expand]
function SDHCIHostDeregister(SDHCI:PSDHCIHost):LongWord;
Description: Deregister a SDHCI from the SDHCI table


[Expand]
function SDHCIHostFind(SDHCIId:LongWord):PSDHCIHost;
Description: To be documented


[Expand]
function SDHCIHostEnumerate(Callback:TSDHCIEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function SDHCIHostNotification(SDHCI:PSDHCIHost; Callback:TSDHCINotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


MMC helper functions

[Expand]
function MMCGetCount:LongWord;
Description: Get the current MMC count


[Expand]
function MMCDeviceCheck(MMC:PMMCDevice):PMMCDevice;
Description: Check if the supplied MMC is in the MMC table


[Expand]
function MMCIsSD(MMC:PMMCDevice):Boolean;
Description: To be documented


[Expand]
function MMCIsSDIO(MMC:PMMCDevice):Boolean;
Description: To be documented


[Expand]
function MMCGetSDHCI(MMC:PMMCDevice):PSDHCIHost; inline;
Description: To be documented


[Expand]
function MMCGetCIDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;
Description: Extract a CID field value from the 128 bit Card Identification register


[Expand]
function MMCGetCSDValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Description: Extract a CSD field value from the 128 bit Card Specific register


[Expand]
function MMCExtractBits(Buffer:Pointer; Start,Size:LongWord):LongWord;
Description: To be documented


[Expand]
function MMCExtractBitsEx(Buffer:Pointer; Length,Start,Size:LongWord):LongWord;
Description: To be documented


[Expand]
function MMCIsMultiCommand(Command:Word):Boolean; inline;
Description: To be documented


[Expand]
function MMCIsNonRemovable(MMC:PMMCDevice):Boolean; inline;
Description: To be documented


[Expand]
function MMCHasExtendedCSD(MMC:PMMCDevice):Boolean; inline;
Description: To be documented


[Expand]
function MMCHasSetBlockCount(MMC:PMMCDevice):Boolean; inline;
Description: To be documented


[Expand]
function MMCHasAutoBlockCount(MMC:PMMCDevice):Boolean; inline;
Description: To be documented


[Expand]
function MMCHasAutoCommandStop(MMC:PMMCDevice):Boolean; inline;
Description: To be documented


[Expand]
function MMCStatusToString(Status:LongWord):String;
Description: Translates an MMC status code into a string describing it


[Expand]
function MMCVersionToString(Version:LongWord):String;
Description: Translates an MMC version into a string


[Expand]
function MMCTimingToString(Timing:LongWord):String;
Description: Translates an MMC timing into a string


[Expand]
function MMCBusWidthToString(BusWidth:LongWord):String;
Description: Translates an MMC bus width into a string


[Expand]
function MMCDriverTypeToString(DriverType:LongWord):String;
Description: Translates an MMC driver type into a string


[Expand]
function MMCSignalVoltageToString(SignalVoltage:LongWord):String;
Description: Translates an MMC signal voltage into a string


[Expand]
function MMCDeviceTypeToString(MMCType:LongWord):String;
Description: To be documented


[Expand]
function MMCDeviceStateToString(MMCState:LongWord):String;
Description: To be documented


[Expand]
function MMCDeviceStateToNotification(State:LongWord):LongWord;
Description: Convert a Device state value into the notification code for device notifications


[Expand]
procedure MMCLog(Level:LongWord; MMC:PMMCDevice; const AText:String);
Description: To be documented


[Expand]
procedure MMCLogInfo(MMC:PMMCDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure MMCLogWarn(MMC:PMMCDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure MMCLogError(MMC:PMMCDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure MMCLogDebug(MMC:PMMCDevice; const AText:String); inline;
Description: To be documented


SD helper functions

[Expand]
function SDGetMaxClock(MMC:PMMCDevice):LongWord;
Description: Determine the Maximum Clock (DTR) for the current card


[Expand]
function SDGetCIDValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Description: Extract a CID field value from the 128 bit Card Identification register


[Expand]
function SDGetCSDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;
Description: Extract a CSD field value from the 128 bit Card Specific register


[Expand]
function SDGetSCRValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Description: Extract an SCR field value from the 64 bit SD Configuration register


[Expand]
function SDGetSSRValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Description: Extract an SCR field value from the 512 bit SD Status register


[Expand]
function SDGetSwitchValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Description: Extract a Switch field value from the 512 bit SD Switch status


[Expand]
function SDVersionToString(Version:LongWord):String;
Description: Translates an SD version into a string


[Expand]
function SDBusWidthToString(BusWidth:LongWord):String;
Description: Translates an SD bus width into a string


SDIO helper functions

[Expand]
function SDIODriverGetCount:LongWord;
Description: Get the current SDIO driver count


[Expand]
function SDIODriverCheck(Driver:PSDIODriver):PSDIODriver;
Description: Check if the supplied SDIO Driver is in the driver table


[Expand]
function SDIODeviceGetMaxClock(MMC:PMMCDevice):LongWord;
Description: Determine the Maximum Clock (DTR) for the current SDIO device


[Expand]
function SDIOFunctionGetMMC(Func:PSDIOFunction):PMMCDevice;
Description: To be documented


[Expand]
function SDIOFunctionGetSDHCI(Func:PSDIOFunction):PSDHCIHost;
Description: To be documented


[Expand]
function SDIOVersionToString(Version:LongWord):String;
Description: Translates an SDIO version into a string


[Expand]
function SDIOFunctionStateToString(SDIOState:LongWord):String;
Description: To be documented


[Expand]
function SDIOFunctionStatusToString(SDIOStatus:LongWord):String;
Description: To be documented


[Expand]
function SDIOFunctionStateToNotification(State:LongWord):LongWord;
Description: Convert a Device state value into the notification code for device notifications


[Expand]
SDIOFunctionStatusToNotification(Status:LongWord):LongWord;
Description: Convert a Device status value into the notification code for device notifications


SDHCI helper functions

[Expand]
function SDHCIGetCount:LongWord;
Description: Get the current SDHCI count


[Expand]
function SDHCIHostCheck(SDHCI:PSDHCIHost):PSDHCIHost;
Description: Check if the supplied SDHCI is in the SDHCI table


[Expand]
function SDHCIIsSPI(SDHCI:PSDHCIHost):Boolean;
Description: To be documented


[Expand]
function SDHCIHasDMA(SDHCI:PSDHCIHost):Boolean;
Description: To be documented


[Expand]
function SDHCIHasCMD23(SDHCI:PSDHCIHost):Boolean;
Description: To be documented


[Expand]
function SDHCIAutoCMD12(SDHCI:PSDHCIHost):Boolean;
Description: To be documented


[Expand]
function SDHCIAutoCMD23(SDHCI:PSDHCIHost):Boolean;
Description: To be documented


[Expand]
function SDHCIGetVersion(SDHCI:PSDHCIHost):Word;
Description: To be documented


[Expand]
function SDHCIGetCommand(Command:Word):Word;
Description: To be documented


[Expand]
function SDHCIMakeCommand(Command,Flags:Word):Word;
Description: To be documented


[Expand]
function SDHCIMakeBlockSize(DMA,BlockSize:Word):Word;
Description: To be documented


[Expand]
function SDHCIVersionToString(Version:LongWord):String;
Description: Translate an SDHCI version into a string


[Expand]
function SDHCIPowerToString(Power:LongWord):String;
Description: Translate an SDHCI power value into a string


[Expand]
function SDHCIDeviceTypeToString(SDHCIType:LongWord):String; inline;
Description: To be documented


[Expand]
function SDHCIHostTypeToString(SDHCIType:LongWord):String;
Description: To be documented


[Expand]
function SDHCIDeviceStateToString(SDHCIState:LongWord):String; inline;
Description: To be documented


[Expand]
function SDHCIHostStateToString(SDHCIState:LongWord):String;
Description: To be documented


[Expand]
function SDHCIHostStateToNotification(State:LongWord):LongWord;
Description: Convert a Host state value into the notification code for device notifications


MMC storage functions

[Expand]
function MMCStorageDeviceRead(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function MMCStorageDeviceWrite(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function MMCStorageDeviceErase(Storage:PStorageDevice; const Start,Count:Int64):LongWord;
Description: To be documented


[Expand]
function MMCStorageDeviceControl(Storage:PStorageDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Description: To be documented


SDIO macro replacement functions

[Expand]
function SDIO_FBR_BASE(Number:LongWord):LongWord; inline;
Description: To be documented


Return to Unit Reference