2.100 Secure Digital MultiMedia Card Controller (SDMMC)
This Plib implements software abstraction for SDMMC Peripheral.
Library Interface
SD/MMC Host Controller peripheral library provides the following interfaces:
Functions
Name | Description |
---|---|
SDMMCx_BusWidthSet | Configures the width of the data bus |
SDMMCx_SpeedModeSet | Sets the bus speed |
SDMMCx_BlockSizeSet | Sets the size of the one data block of transfer |
SDMMCx_BlockCountSet | Sets the number of blocks to transfer |
SDMMCx_IsCmdLineBusy | Returns the status of the command line |
SDMMCx_IsDatLineBusy | Returns the status of the data line |
SDMMCx_IsWriteProtected | Returns the write protect switch pin level |
SDMMCx_IsCardAttached | Indicates if the card is attached or detached |
SDMMCx_ClockSet | Sets the SDMMC clock frequency |
SDMMCx_ClockEnable | Enable SDMMC clock |
SDMMCx_ClockDisable | Disable SDMMC clock |
SDMMCx_CommandErrorGet | Returns the errors associated with a command transfer |
SDMMCx_DataErrorGet | Returns the errors associated with a data transfer |
SDMMCx_ErrorReset | Resets errors as specified by the resetType |
SDMMCx_ResponseRead | Reads the response to a given command |
SDMMCx_ModuleInit | Initializes the SDMMC peripheral |
SDMMCx_Initialize | Initializes the SDMMC peripheral and the internal data structures used by the peripheral library |
SDMMCx_CallbackRegister | This function allows a SDMMC PLIB client to set an event handler |
SDMMCx_CommandSend | This function allows the client to send a SD command on the SDMMC interface |
SDMMCx_DmaSetup | Sets up the DMA for data tranfers |
Data types and constants
Name | Type | Description |
---|---|---|
SDMMC_BUS_WIDTH | Enum | The enumeration lists the bus widths for the SDMMC bus |
SDMMC_SPEED_MODE | Enum | The enumeration lists the bus widths for the SDMMC bus |
SDMMC_READ_RESPONSE_REG | Enum | The enumeration lists the response registers that can be read for a given command |
SDMMC_RESET_TYPE | Enum | The enumeration lists error type to reset |
SDMMC_XFER_STATUS | Enum | The enumeration lists the status of the transfer |
SDMMC_DATA_TRANSFER_DIR | Enum | The enumeration lists the direction of the data transfer |
SDMMC_DataTransferFlags | Struct | The data structure is used by the client to provide information about the data transfer to the SDMMC PLIB |
SDMMC_CALLBACK | Typedef | The prototype of the SDMMC callback function |
Note: Not all APIs maybe implemented. See the specific device family
section for available APIs.