Difference between revisions of "Unit MMC"

From Ultibo.org
Jump to: navigation, search
Line 232: Line 232:
 
<pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendCardStatus(MMC:PMMCDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendCardStatus(MMC:PMMCDevice):LongWord;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendCardSpecific(MMC:PMMCDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MMCDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Given a 128-bit response, decode to our card CSD structure</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"

Revision as of 06:16, 12 October 2016

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;
Description: To be documented
Note None documented


function MMCStart:LongWord;
Description: To be documented
Note None documented


function MMCStop:LongWord;
Description: To be documented
Note None documented


procedure MMCAsyncStart(SDHCI:PSDHCIHost);
Description: To be documented
Note None documented


MMC functions

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


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


function MMCDeviceEraseBlocks(MMC:PMMCDevice; const Start,Count:Int64):LongWord;
Description: To be documented
Note None documented


function MMCDeviceGoIdle(MMC:PMMCDevice):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSetClock(MMC:PMMCDevice; Clock:LongWord):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
Description: To be documented
Reference Section 3.4 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf


function MMCDeviceSetBlockLength(MMC:PMMCDevice; Length:LongWord):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSetBlockCount(MMC:PMMCDevice; Count:LongWord; Relative:Boolean):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSetDriverStage(MMC:PMMCDevice; DriverStage:LongWord):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSelectCard(MMC:PMMCDevice):LongWord;
Description: To be documented
Note None documented


function MMCDeviceDeselectCard(MMC:PMMCDevice):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSwitch(MMC:PMMCDevice; Setting,Index,Value:Byte):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSendCardStatus(MMC:PMMCDevice):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Description: To be documented
Note None documented


function MMCDeviceSendCardSpecific(MMC:PMMCDevice):LongWord;
Description: To be documented
Note None documented


function MMCDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
Description: Given a 128-bit response, decode to our card CSD structure
Note None documented


Return to Unit Reference