Difference between revisions of "Unit PL18X"
From Ultibo.org
(4 intermediate revisions by the same user not shown) | |||
Line 874: | Line 874: | ||
|- | |- | ||
| <code>IRQ0:LongWord;</code> | | <code>IRQ0:LongWord;</code> | ||
− | | | + | | First host IRQ line |
|- | |- | ||
| <code>IRQ1:LongWord;</code> | | <code>IRQ1:LongWord;</code> | ||
− | | | + | | Second host IRQ line |
|- | |- | ||
− | | <code> | + | | <code>EnableFIQ:LongBool;</code> |
− | | | + | | Use FIQ instead of IRQ |
|- | |- | ||
| <code>SingleIRQ:LongBool;</code> | | <code>SingleIRQ:LongBool;</code> | ||
Line 899: | Line 899: | ||
| <code>DataCtrlRegister:LongWord;</code> | | <code>DataCtrlRegister:LongWord;</code> | ||
| Current data control register value | | Current data control register value | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| <code>BusyStatus:LongWord;</code> | | <code>BusyStatus:LongWord;</code> | ||
Line 954: | Line 948: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Called only during system startup | | Called only during system startup | ||
|- | |- | ||
Line 964: | Line 958: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 PL180SDHCICreate(Address: | + | <pre style="border: 0; padding-bottom:0px;">function PL180SDHCICreate(Address:PtrUInt; const Name:String; IRQ0,IRQ1,ClockMinimum,ClockMaximum:LongWord; CardDetect:TMMCDeviceGetCardDetect = nil; WriteProtect:TMMCDeviceGetWriteProtect = nil):PSDHCIHost;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create and register a new PL180 SDHCI device which can be accessed using the SDHCI API</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create and register a new PL180 SDHCI device which can be accessed using the SDHCI API</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;" | ||
|- | |- | ||
− | ! | + | ! Address |
| The address of the PL180 registers | | The address of the PL180 registers | ||
|- | |- | ||
− | ! | + | ! Name |
| The text description of this device which will show in the device list (Optional) | | The text description of this device which will show in the device list (Optional) | ||
|- | |- | ||
− | ! | + | ! IRQ0 |
| The interrupt 0 number for the PL180 | | The interrupt 0 number for the PL180 | ||
|- | |- | ||
− | ! | + | ! IRQ1 |
| The interrupt 1 number for the PL180 | | The interrupt 1 number for the PL180 | ||
|- | |- | ||
− | ! | + | ! ClockMinimum |
| The minimum frequency for the Pl180 clock | | The minimum frequency for the Pl180 clock | ||
|- | |- | ||
− | ! | + | ! ClockMaximum |
| The maximum frequency for the Pl180 clock | | The maximum frequency for the Pl180 clock | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new SDHCI device or nil if the SDHCI device could not be created | | Pointer to the new SDHCI device or nil if the SDHCI device could not be created | ||
|- | |- | ||
Line 994: | Line 988: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 PL181SDHCICreate(Address: | + | <pre style="border: 0; padding-bottom:0px;">function PL181SDHCICreate(Address:PtrUInt; const Name:String; IRQ0,IRQ1,ClockMinimum,ClockMaximum:LongWord; CardDetect:TMMCDeviceGetCardDetect = nil; WriteProtect:TMMCDeviceGetWriteProtect = nil):PSDHCIHost;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create and register a new PL181 SDHCI device which can be accessed using the SDHCI API</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create and register a new PL181 SDHCI device which can be accessed using the SDHCI API</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;" | ||
|- | |- | ||
− | ! | + | ! Address |
| The address of the PL181 registers | | The address of the PL181 registers | ||
|- | |- | ||
− | ! | + | ! Name |
| The text description of this device which will show in the device list (Optional) | | The text description of this device which will show in the device list (Optional) | ||
|- | |- | ||
− | ! | + | ! IRQ0 |
| The interrupt 0 number for the PL181 | | The interrupt 0 number for the PL181 | ||
|- | |- | ||
− | ! | + | ! IRQ1 |
| The interrupt 1 number for the PL181 | | The interrupt 1 number for the PL181 | ||
|- | |- | ||
− | ! | + | ! ClockMinimum |
| The minimum frequency for the Pl181 clock | | The minimum frequency for the Pl181 clock | ||
|- | |- | ||
− | ! | + | ! ClockMaximum |
| The maximum frequency for the Pl181 clock | | The maximum frequency for the Pl181 clock | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new SDHCI device or nil if the SDHCI device could not be created | | Pointer to the new SDHCI device or nil if the SDHCI device could not be created | ||
|- | |- | ||
Line 1,029: | Line 1,023: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! SDHCI |
| The SDHCI device to destroy | | The SDHCI device to destroy | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 1,041: | Line 1,035: | ||
'''PL18X MMC functions''' | '''PL18X MMC functions''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 PL18XMMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function PL18XMMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;</pre> | ||
Line 1,059: | Line 1,041: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use MMCDeviceGetCardDetect instead | + | | Not intended to be called directly by applications, use MMCDeviceGetCardDetect instead. |
|- | |- | ||
|} | |} | ||
Line 1,071: | Line 1,053: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use MMCDeviceGetWriteProtect instead | + | | Not intended to be called directly by applications, use MMCDeviceGetWriteProtect instead. |
|- | |- | ||
|} | |} | ||
Line 1,083: | Line 1,065: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use MMCDeviceSendCommand instead | + | | Not intended to be called directly by applications, use MMCDeviceSendCommand instead. |
|- | |- | ||
|} | |} | ||
Line 1,095: | Line 1,077: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use MMCDeviceSetIOS instead | + | | Not intended to be called directly by applications, use MMCDeviceSetIOS instead. |
|- | |- | ||
|} | |} | ||
Line 1,110: | Line 1,092: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use SDHCIHostStart instead | + | | Not intended to be called directly by applications, use SDHCIHostStart instead. |
|- | |- | ||
|} | |} | ||
Line 1,122: | Line 1,104: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use SDHCIHostStop instead | + | | Not intended to be called directly by applications, use SDHCIHostStop instead. |
|- | |- | ||
|} | |} | ||
Line 1,134: | Line 1,116: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use SDHCIHostReadByte instead | + | | Not intended to be called directly by applications, use SDHCIHostReadByte instead. |
|- | |- | ||
|} | |} | ||
Line 1,146: | Line 1,128: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use SDHCIHostReadWord instead | + | | Not intended to be called directly by applications, use SDHCIHostReadWord instead. |
|- | |- | ||
|} | |} | ||
Line 1,158: | Line 1,140: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use SDHCIHostReadLong instead | + | | Not intended to be called directly by applications, use SDHCIHostReadLong instead. |
|- | |- | ||
|} | |} | ||
Line 1,170: | Line 1,152: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use SDHCIHostWriteByte instead | + | | Not intended to be called directly by applications, use SDHCIHostWriteByte instead. |
|- | |- | ||
|} | |} | ||
Line 1,182: | Line 1,164: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use SDHCIHostWriteWord instead | + | | Not intended to be called directly by applications, use SDHCIHostWriteWord instead. |
|- | |- | ||
|} | |} | ||
Line 1,194: | Line 1,176: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! ''' | + | ! Note |
− | | Not intended to be called directly by applications, use | + | | Not intended to be called directly by applications, use SDHCIHostWriteLong instead. |
+ | |- | ||
+ | |} | ||
+ | </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 PL18XSDHCIHostSetPower(SDHCI:PSDHCIHost; Power:Word):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of SDHCISetPower API for PL18X SDHCI</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use SDHCISetPower instead. | ||
|- | |- | ||
|} | |} | ||
Line 1,206: | Line 1,200: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 1,218: | Line 1,212: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
Caller must hold the host lock | Caller must hold the host lock | ||
Line 1,231: | Line 1,225: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
Caller must hold the host lock | Caller must hold the host lock | ||
Line 1,244: | Line 1,238: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
Caller must hold the host lock | Caller must hold the host lock | ||
Line 1,257: | Line 1,251: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 1,269: | Line 1,263: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
Caller must hold the host lock | Caller must hold the host lock | ||
Line 1,282: | Line 1,276: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
Caller must hold the host lock | Caller must hold the host lock | ||
Line 1,298: | Line 1,292: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,310: | Line 1,304: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,322: | Line 1,316: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,334: | Line 1,328: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,346: | Line 1,340: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,358: | Line 1,352: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the host lock | | Caller must hold the host lock | ||
|- | |- | ||
Line 1,370: | Line 1,364: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the host lock | | Caller must hold the host lock | ||
|- | |- | ||
Line 1,382: | Line 1,376: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the host lock | | Caller must hold the host lock | ||
|- | |- | ||
Line 1,394: | Line 1,388: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the host lock | | Caller must hold the host lock | ||
|- | |- | ||
Line 1,406: | Line 1,400: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the host lock | | Caller must hold the host lock | ||
|- | |- | ||
Line 1,418: | Line 1,412: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the host lock | | Caller must hold the host lock | ||
|- | |- |
Latest revision as of 06:06, 7 April 2023
Return to Unit Reference
Contents
[hide]Description
ARM PrimeCell PL180/181 Multimedia Card Interface Driver unit
The PL180/181 Multimedia Card is an ARM peripheral that is compatible with MMC multimedia cards and SD secure digital cards in memory mapped I/O format compatible with the ARM advanced peripheral bus (APB).
The design of the Pl180/181 allows for multiple cards per controller however this driver currently only supports attaching one card.
Constants
[Expand]
PL18X specific constants
PL180_MMCI_*
[Expand]
PL18X power control register
PL18X_MMCI_POWER_*
[Expand]
PL18X clock control register
PL18X_MMCI_CLOCK*
[Expand]
PL18X argument register
PL18X_MMCI_ARGUMENT*
[Expand]
PL18X command register
PL18X_MMCI_COMMAND*
[Expand]
PL18X command response register
PL18X_MMCI_RESPCMD*
[Expand]
PL18X response registers
PL18X_MMCI_RESPONSE*
[Expand]
PL18X data timer register
PL18X_MMCI_DATATIMER*
[Expand]
PL18X data length register
PL18X_MMCI_DATALENGTH*
[Expand]
PL18X data control register
PL18X_MMCI_DATACTRL*
[Expand]
PL18X data counter register
PL18X_MMCI_DATACNT*
[Expand]
PL18X status register
PL18X_MMCI_STATUS*
[Expand]
PL18X clear register
PL18X_MMCI_CLEAR*
[Expand]
PL18X interrupt mask registers
PL18X_MMCI_MASK*
[Expand]
PL18X SD card select register
PL18X_MMCI_SELECT*
[Expand]
PL18X FIFO counter register
PL18X_MMCI_FIFOCNT*
[Expand]
PL18X data FIFO register
PL18X_MMCI_FIFO*
[Expand]
PL18X peripheral identification register
PL18X_MMCI_PERIPHID*
[Expand]
PL18X PrimeCell identification register
PL18X_MMCI_PCELLID*
Type definitions
PL18X version Id
PL18X version data
PL18X MMCI registers
PL18X SDHCI get RXFIFO count
TPL18XSDHCIGetRXFIFOCount = function(SDHCI:PPL18XSDHCIHost; Status,Remain:LongWord):LongWord;
|
PL18X SDHCI host
Public variables
PL18X specific variables
PL18X_MMCI_FIQ_ENABLED:LongBool;
|
The SDHCI uses Fast Interrupt Requests (FIQ) instead of IRQ |
PL18X_MMCI_MIN_FREQ:LongWord = 400000;
|
Minimum clock frequency for SDHCI (Default minimum of 400KHz) |
PL18X_MMCI_MAX_FREQ:LongWord = 400000;
|
Maximum clock frequency for SDHCI (Default maximum of 400KHz) |
Function declarations
Initialization functions
PL18X functions
[Expand]
function PL180SDHCICreate(Address:PtrUInt; const Name:String; IRQ0,IRQ1,ClockMinimum,ClockMaximum:LongWord; CardDetect:TMMCDeviceGetCardDetect = nil; WriteProtect:TMMCDeviceGetWriteProtect = nil):PSDHCIHost;
Description: Create and register a new PL180 SDHCI device which can be accessed using the SDHCI API
[Expand]
function PL181SDHCICreate(Address:PtrUInt; const Name:String; IRQ0,IRQ1,ClockMinimum,ClockMaximum:LongWord; CardDetect:TMMCDeviceGetCardDetect = nil; WriteProtect:TMMCDeviceGetWriteProtect = nil):PSDHCIHost;
Description: Create and register a new PL181 SDHCI device which can be accessed using the SDHCI API
[Expand]
function PL18XSDHCIDestroy(SDHCI:PSDHCIHost):LongWord;
Description: Stop, deregister and destroy a PL18X SDHCI device created by this driver
PL18X MMC functions
[Expand]
function PL18XMMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;
Description: Implementation of MMCDeviceGetCardDetect API for PL18X SDHCI
[Expand]
function PL18XMMCDeviceGetWriteProtect(MMC:PMMCDevice):LongWord;
Description: Implementation of MMCDeviceGetWriteProtect API for PL18X SDHCI
[Expand]
function PL18XMMCDeviceSendCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
Description: Implementation of MMCDeviceSendCommand API for PL18X SDHCI
[Expand]
function PL18XMMCDeviceSetIOS(MMC:PMMCDevice):LongWord;
Description: Implementation of MMCDeviceSetIOS API for PL18X SDHCI
PL18X SDHCI functions
[Expand]
function PL18XSDHCIHostStart(SDHCI:PSDHCIHost):LongWord;
Description: Implementation of SDHCIHostStart API for PL18X SDHCI
[Expand]
function PL18XSDHCIHostStop(SDHCI:PSDHCIHost):LongWord;
Description: Implementation of SDHCIHostStop API for PL18X SDHCI
[Expand]
function PL18XSDHCIHostReadByte(SDHCI:PSDHCIHost; Reg:LongWord):Byte;
Description: Implementation of SDHCIHostReadByte API for PL18X SDHCI
[Expand]
function PL18XSDHCIHostReadWord(SDHCI:PSDHCIHost; Reg:LongWord):Word;
Description: Implementation of SDHCIHostReadWord API for PL18X SDHCI
[Expand]
function PL18XSDHCIHostReadLong(SDHCI:PSDHCIHost; Reg:LongWord):LongWord;
Description: Implementation of SDHCIHostReadLong API for PL18X SDHCI
[Expand]
procedure PL18XSDHCIHostWriteByte(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte);
Description: Implementation of SDHCIHostWriteByte API for PL18X SDHCI
[Expand]
procedure PL18XSDHCIHostWriteWord(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word);
Description: Implementation of SDHCIHostWriteWord API for PL18X SDHCI
[Expand]
procedure PL18XSDHCIHostWriteLong(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord);
Description: Implementation of SDHCIHostWriteLong API for PL18X SDHCI
[Expand]
function PL18XSDHCIHostSetPower(SDHCI:PSDHCIHost; Power:Word):LongWord;
Description: Implementation of SDHCISetPower API for PL18X SDHCI
[Expand]
procedure PL18XSDHCIInterruptHandler(SDHCI:PPL18XSDHCIHost);
Description: Interrupt handler for the PL18X SDHCI
[Expand]
procedure PL18XSDHCIDataInterrupt(SDHCI:PPL18XSDHCIHost; Status:LongWord);
Description: Data interrupt handler for the PL18X SDHCI
[Expand]
procedure PL18XSDHCICommandInterrupt(SDHCI:PPL18XSDHCIHost; Status:LongWord);
Description: Command interrupt handler for the PL18X SDHCI
[Expand]
procedure PL18XSDHCIStopData(SDHCI:PPL18XSDHCIHost);
Description: Data stop handler for the PL18X SDHCI
[Expand]
procedure PL18XSDHCIPIOInterruptHandler(SDHCI:PPL18XSDHCIHost);
Description: PIO Interrupt handler for the PL18X SDHCI
[Expand]
function PL18XSHDCIReadPIO(SDHCI:PPL18XSDHCIHost ;Buffer:Pointer; Remain:LongWord):LongWord;
Description: PIO read interrupt handler for the PL18X SDHCI
[Expand]
function PL18XSDHCIWritePIO(SDHCI:PPL18XSDHCIHost; Buffer:Pointer; Remain,Status:LongWord):LongWord;
Description: PIO read interrupt handler for the PL18X SDHCI
PL18X helper functions
[Expand]
function PL18XGetPeripheralID(SDHCI:PPL18XSDHCIHost):LongWord;
Description: Return the Peripheral Id for a PL18X SDHCI device
[Expand]
function PL18XGetVersionData(SDHCI:PPL18XSDHCIHost):PPL18XVersionData;
Description: Return the version data for a PL18X SDHCI device based on the Peripheral Id
[Expand]
function PL18XGetRXFIFOCount(SDHCI:PPL18XSDHCIHost; Status,Remain:LongWord):LongWord;
Description: Determine the receive FIFO count available
[Expand]
function PL18XQualcommGetRXFIFOCount(SDHCI:PPL18XSDHCIHost; Status,Remain:LongWord):LongWord;
Description: Determine the receive FIFO count available
[Expand]
procedure PL18XRegisterDelay(SDHCI:PPL18XSDHCIHost);
Description: Delay for the required amount of time after a register write
[Expand]
procedure PL18XSetClockRegister(SDHCI:PPL18XSDHCIHost; MMC:PMMCDevice; Desired:LongWord);
Description: Setup the current clock rate in the clock register
[Expand]
procedure PL18XSetPowerRegister(SDHCI:PPL18XSDHCIHost; Value:LongWord);
Description: Setup the current power state in the power register
[Expand]
procedure PL18XSetInterruptMask1(SDHCI:PPL18XSDHCIHost; Mask:LongWord);
Description: Setup the interrupt mask to use either Mask0 or Mask1 depending on configuration
[Expand]
procedure PL18XWriteClockRegister(SDHCI:PPL18XSDHCIHost; Clock:LongWord);
Description: Write to the clock register
[Expand]
procedure PL18XWritePowerRegister(SDHCI:PPL18XSDHCIHost; Power:LongWord);
Description: Write to the power register
[Expand]
procedure PL18XWriteDataCtrlRegister(SDHCI:PPL18XSDHCIHost; DataCtrl:LongWord);
Description: Write to the data control register
Return to Unit Reference