2.99 SD/MMC Host Controller (SDHC)
This Plib implements software abstraction for SDHC Peripheral.
Library Interface
SDHC peripheral library provides the following interfaces:
Functions
Name | Description |
---|---|
SDHCx_BusWidthSet | Configures the width of the data bus |
SDHCx_SpeedModeSet | Sets the bus speed |
SDHCx_BlockSizeSet | Sets the size of the one data block of transfer |
SDHCx_BlockCountSet | Sets the number of blocks to transfer |
SDHCx_IsCmdLineBusy | Returns the status of the command line |
SDHCx_IsDatLineBusy | Returns the status of the data line |
SDHCx_IsWriteProtected | Returns the write protect switch pin level |
SDHCx_IsCardAttached | Indicates if the card is attached or detached |
SDHCx_ClockSet | Sets the SDHC clock frequency |
SDHCx_ClockEnable | Enable SDHC clock |
SDHCx_ClockDisable | Disable SDHC clock |
SDHCx_CommandErrorGet | Returns the errors associated with a command transfer |
SDHCx_DataErrorGet | Returns the errors associated with a data transfer |
SDHCx_ErrorReset | Resets errors as specified by the resetType |
SDHCx_ResponseRead | Reads the response to a given command |
SDHCx_ModuleInit | Initializes the SDHC peripheral |
SDHCx_Initialize | Initializes the SDHC peripheral and the internal data structures used by the peripheral library |
SDHCx_CallbackRegister | This function allows a SDHC PLIB client to set an event handler |
SDHCx_CommandSend | This function allows the client to send a SD command on the SDHC interface |
SDHCx_DmaSetup | Sets up the DMA for data transfers |
SDHC_CardDetectEnable | Enables the use of SD Card Detect Pin |
SDHC_CardDetectDisable | Disables the use of SD Card Detect Pin |
SDHC_WriteProtectEnable | Enables the use of SD Card Write Protect Pin |
SDHC_WriteProtectDisable | Disables the use of SD Card Write Protect Pin |
Data types and constants
Name | Type | Description |
---|---|---|
SDHC_BUS_WIDTH | Enum | The enumeration lists the bus widths for the SDHC bus |
SDHC_SPEED_MODE | Enum | The enumeration lists the bus widths for the SDHC bus |
SDHC_CMD_RESP_TYPE | Enum | The enumeration lists the supported response types |
SDHC_READ_RESPONSE_REG | Enum | The enumeration lists the response registers that can be read for a given command |
SDHC_RESET_TYPE | Enum | The enumeration lists error type to reset |
SDHC_CLK_MODE | Enum | The enumeration lists the clock modes |
SDHC_XFER_STATUS | Enum | The enumeration lists the status of the transfer |
SDHC_DATA_TRANSFER_TYPE | Enum | The enumeration lists single or multi block data transfer type |
SDHC_DATA_TRANSFER_DIR | Enum | The enumeration lists the direction of the data transfer |
SDHC_DataTransferFlags | Struct | The data structure is used by the client to provide information about the data transfer to the SDHC PLIB |
SDHC_CALLBACK | Typedef | The prototype of the SDHC callback function |
Note: Not all APIs maybe implemented. See the specific device family
section for available APIs.