|  | MCUXpresso SDK API Reference Manual
    Rev. 0
    NXP Semiconductors | 
| Data Structures | |
| struct | sdmmchost_pwr_card_t | 
| card power control  More... | |
| struct | sdmmchost_t | 
| sdmmc host handler  More... | |
| Macros | |
| #define | FSL_SDMMC_HOST_ADAPTER_VERSION (MAKE_VERSION(2U, 3U, 1U)) /*2.3.1*/ | 
| Middleware adapter version.  More... | |
| #define | SDMMCHOST_SUPPORT_HIGH_SPEED (1U) | 
| host capability | |
| #define | SDMMCHOST_INSTANCE_SUPPORT_8_BIT_WIDTH(host) 1U | 
| sdmmc host instance capability | |
| #define | SDMMCHOST_DMA_DESCRIPTOR_BUFFER_ALIGN_SIZE (4U) | 
| SDMMC host dma descriptor buffer address align size. | |
| #define | SDMMCHOST_RESET_TIMEOUT_VALUE (1000000U) | 
| SDMMC host reset timoue value. | |
| Typedefs | |
| typedef sdif_transfer_t | sdmmchost_transfer_t | 
| sdmmc host transfer function | |
| typedef void(* | sdmmchost_pwr_t )(void) | 
| card power control function pointer | |
| Enumerations | |
| enum | _sdmmchost_endian_mode { kSDMMCHOST_EndianModeBig = 0U, kSDMMCHOST_EndianModeHalfWordBig = 1U, kSDMMCHOST_EndianModeLittle = 2U } | 
| host Endian mode corresponding to driver define  More... | |
| SDIF host controller function | |
| void | SDMMCHOST_SetCardBusWidth (sdmmchost_t *host, uint32_t dataBusWidth) | 
| set data bus width.  More... | |
| static void | SDMMCHOST_SendCardActive (sdmmchost_t *host) | 
| Send initilization active 80 clocks to card.  More... | |
| static uint32_t | SDMMCHOST_SetCardClock (sdmmchost_t *host, uint32_t targetClock) | 
| Set card bus clock.  More... | |
| static bool | SDMMCHOST_IsCardBusy (sdmmchost_t *host) | 
| check card status by DATA0.  More... | |
| status_t | SDMMCHOST_StartBoot (sdmmchost_t *host, sdmmchost_boot_config_t *hostConfig, sdmmchost_cmd_t *cmd, uint8_t *buffer) | 
| start read boot data.  More... | |
| status_t | SDMMCHOST_ReadBootData (sdmmchost_t *host, sdmmchost_boot_config_t *hostConfig, uint8_t *buffer) | 
| read boot data.  More... | |
| static void | SDMMCHOST_EnableBoot (sdmmchost_t *host, bool enable) | 
| enable boot mode.  More... | |
| static void | SDMMCHOST_EnableCardInt (sdmmchost_t *host, bool enable) | 
| enable card interrupt.  More... | |
| status_t | SDMMCHOST_CardIntInit (sdmmchost_t *host, void *sdioInt) | 
| card interrupt function.  More... | |
| status_t | SDMMCHOST_CardDetectInit (sdmmchost_t *host, void *cd) | 
| card detect init function.  More... | |
| status_t | SDMMCHOST_PollingCardDetectStatus (sdmmchost_t *host, uint32_t waitCardStatus, uint32_t timeout) | 
| Detect card insert, only need for SD cases.  More... | |
| uint32_t | SDMMCHOST_CardDetectStatus (sdmmchost_t *host) | 
| card detect status.  More... | |
| status_t | SDMMCHOST_Init (sdmmchost_t *host) | 
| Init host controller.  More... | |
| void | SDMMCHOST_Deinit (sdmmchost_t *host) | 
| Deinit host controller.  More... | |
| void | SDMMCHOST_SetCardPower (sdmmchost_t *host, bool enable) | 
| host power off card function.  More... | |
| status_t | SDMMCHOST_TransferFunction (sdmmchost_t *host, sdmmchost_transfer_t *content) | 
| host transfer function.  More... | |
| void | SDMMCHOST_Reset (sdmmchost_t *host) | 
| host reset function.  More... | |
| status_t | SDMMCHOST_WaitCardDetectStatus (SDMMCHOST_TYPE *hostBase, const sdmmchost_detect_card_t *cd, bool waitCardStatus) | 
| wait card detect status  More... | |
| void | SDMMCHOST_PowerOffCard (SDMMCHOST_TYPE *base, const sdmmchost_pwr_card_t *pwr) | 
| host power off card function.  More... | |
| void | SDMMCHOST_PowerOnCard (SDMMCHOST_TYPE *base, const sdmmchost_pwr_card_t *pwr) | 
| host power on card function.  More... | |
| struct sdmmchost_pwr_card_t | 
| Data Fields | |
| sdmmchost_pwr_t | powerOn | 
| power on function pointer | |
| uint32_t | powerOnDelay_ms | 
| power on delay | |
| sdmmchost_pwr_t | powerOff | 
| power off function pointer | |
| uint32_t | powerOffDelay_ms | 
| power off delay | |
| struct sdmmchost_t | 
| Data Fields | |
| sdif_host_t | hostController | 
| host configuration | |
| uint8_t | hostPort | 
| host port number, used for one instance support two card | |
| void * | dmaDesBuffer | 
| DMA descriptor buffer address. | |
| uint32_t | dmaDesBufferWordsNum | 
| DMA descriptor buffer size in byte. | |
| sdif_handle_t | handle | 
| host controller handler | |
| sdmmc_osa_event_t | hostEvent | 
| host event handler | |
| void * | cd | 
| card detect | |
| void * | cardInt | 
| call back function for card interrupt | |
| #define FSL_SDMMC_HOST_ADAPTER_VERSION (MAKE_VERSION(2U, 3U, 1U)) /*2.3.1*/ | 
| void SDMMCHOST_SetCardBusWidth | ( | sdmmchost_t * | host, | 
| uint32_t | dataBusWidth | ||
| ) | 
| host | host handler | 
| dataBusWidth | data bus width | 
| 
 | inlinestatic | 
| host | host handler | 
| 
 | inlinestatic | 
| host | host handler | 
| targetClock | target clock frequency | 
| actual | clock frequency can be reach. | 
| 
 | inlinestatic | 
| host | host handler | 
| true | is busy, false is idle. | 
| status_t SDMMCHOST_StartBoot | ( | sdmmchost_t * | host, | 
| sdmmchost_boot_config_t * | hostConfig, | ||
| sdmmchost_cmd_t * | cmd, | ||
| uint8_t * | buffer | ||
| ) | 
| host | host handler | 
| hostConfig | boot configuration | 
| cmd | boot command | 
| buffer | buffer address | 
| status_t SDMMCHOST_ReadBootData | ( | sdmmchost_t * | host, | 
| sdmmchost_boot_config_t * | hostConfig, | ||
| uint8_t * | buffer | ||
| ) | 
| host | host handler | 
| hostConfig | boot configuration | 
| buffer | buffer address | 
| 
 | inlinestatic | 
| host | host handler | 
| enable | true is enable, false is disable | 
| 
 | inlinestatic | 
| host | host handler | 
| enable | true is enable, false is disable. | 
| status_t SDMMCHOST_CardIntInit | ( | sdmmchost_t * | host, | 
| void * | sdioInt | ||
| ) | 
| host | host handler | 
| sdioInt | card interrupt configuration | 
| status_t SDMMCHOST_CardDetectInit | ( | sdmmchost_t * | host, | 
| void * | cd | ||
| ) | 
| host | host handler | 
| cd | card detect configuration | 
| status_t SDMMCHOST_PollingCardDetectStatus | ( | sdmmchost_t * | host, | 
| uint32_t | waitCardStatus, | ||
| uint32_t | timeout | ||
| ) | 
| host | host handler | 
| waitCardStatus | status which user want to wait | 
| timeout | wait time out. | 
| kStatus_Success | detect card insert | 
| kStatus_Fail | card insert event fail | 
| uint32_t SDMMCHOST_CardDetectStatus | ( | sdmmchost_t * | host | ) | 
| host | host handler | 
| kSD_Inserted,kSD_Removed | 
| status_t SDMMCHOST_Init | ( | sdmmchost_t * | host | ) | 
| host | host handler | 
| kStatus_Success | host init success | 
| kStatus_Fail | event fail | 
| void SDMMCHOST_Deinit | ( | sdmmchost_t * | host | ) | 
| host | host handler | 
| void SDMMCHOST_SetCardPower | ( | sdmmchost_t * | host, | 
| bool | enable | ||
| ) | 
| host | host handler | 
| enable | true is power on, false is power down. | 
| status_t SDMMCHOST_TransferFunction | ( | sdmmchost_t * | host, | 
| sdmmchost_transfer_t * | content | ||
| ) | 
| host | host handler | 
| content | transfer content. | 
| void SDMMCHOST_Reset | ( | sdmmchost_t * | host | ) | 
| host | host handler | 
| status_t SDMMCHOST_WaitCardDetectStatus | ( | SDMMCHOST_TYPE * | hostBase, | 
| const sdmmchost_detect_card_t * | cd, | ||
| bool | waitCardStatus | ||
| ) | 
| hostBase | host handler | 
| cd | card detect configuration. | 
| waitCardStatus | status to wait. | 
| void SDMMCHOST_PowerOffCard | ( | SDMMCHOST_TYPE * | base, | 
| const sdmmchost_pwr_card_t * | pwr | ||
| ) | 
| base | host base address. | 
| pwr | depend on user define power configuration. | 
| void SDMMCHOST_PowerOnCard | ( | SDMMCHOST_TYPE * | base, | 
| const sdmmchost_pwr_card_t * | pwr | ||
| ) | 
| base | host base address. | 
| pwr | depend on user define power configuration. |