![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
struct | sdmmchost_cmd_t |
sdmmc host command structure definition More... | |
struct | sdmmchost_data_t |
sdmmc host data structure definition More... | |
struct | sdmmchost_transfer_t |
sdmmc host data structure definition More... | |
struct | sdmmchost_t |
sdmmc host handler More... | |
Macros | |
#define | FSL_SDMMC_HOST_ADAPTER_VERSION (MAKE_VERSION(2U, 0U, 0U)) /*2.0.0*/ |
Middleware adapter version. More... | |
#define | SDMMCHOST_SUPPORT_HIGH_SPEED (1U) |
host capability | |
#define | SDMMCHOST_INSTANCE_SUPPORT_8_BIT_WIDTH(host) 0U |
sdmmc host instance capability | |
#define | SDMMCHOST_DMA_DESCRIPTOR_BUFFER_ALIGN_SIZE 1U |
SDMMC host dma descriptor buffer address align size. | |
Enumerations | |
enum | _sdmmchost_endian_mode { kSDMMCHOST_EndianModeBig = 0U, kSDMMCHOST_EndianModeHalfWordBig = 1U, kSDMMCHOST_EndianModeLittle = 2U } |
host Endian mode corresponding to driver define More... | |
enum | { kCARD_ResponseTypeNone = 0U, kCARD_ResponseTypeR1 = 1U, kCARD_ResponseTypeR1b = 2U, kCARD_ResponseTypeR2 = 3U, kCARD_ResponseTypeR3 = 4U, kCARD_ResponseTypeR4 = 5U, kCARD_ResponseTypeR5 = 6U, kCARD_ResponseTypeR5b = 7U, kCARD_ResponseTypeR6 = 8U, kCARD_ResponseTypeR7 = 9U } |
The command response type. More... | |
SDIOC 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... | |
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... | |
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... | |
struct sdmmchost_cmd_t |
Data Fields | |
uint32_t | index |
Command index. More... | |
uint32_t | argument |
Command argument. More... | |
uint8_t | type |
command type | |
uint32_t | responseType |
Command response type. More... | |
uint32_t | responseErrorFlags |
Response error flag, which need to check the command reponse. More... | |
uint32_t | response [4U] |
pointer registered by application to receive command response | |
uint32_t sdmmchost_cmd_t::index |
uint32_t sdmmchost_cmd_t::argument |
uint32_t sdmmchost_cmd_t::responseType |
uint32_t sdmmchost_cmd_t::responseErrorFlags |
struct sdmmchost_data_t |
Data Fields | |
bool | enableAutoCommand12 |
Enable auto CMD12. More... | |
uint32_t | blockCount |
Block count. More... | |
uint32_t | blockSize |
Block size. More... | |
uint32_t * | txData |
Data buffer to write. More... | |
uint32_t * | rxData |
Buffer to save data read. More... | |
bool sdmmchost_data_t::enableAutoCommand12 |
uint32_t sdmmchost_data_t::blockCount |
uint32_t sdmmchost_data_t::blockSize |
uint32_t* sdmmchost_data_t::txData |
uint32_t* sdmmchost_data_t::rxData |
struct sdmmchost_transfer_t |
struct sdmmchost_t |
Data Fields | |
SDIOC_Type * | base |
host controller base address | |
uint32_t | sourceClock_HZ |
host controller source clock | |
uint32_t | endianMode |
host endian mode | |
sdioc_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, 0U, 0U)) /*2.0.0*/ |
anonymous enum |
Defines the command response type from card to host controller.
void SDMMCHOST_SetCardBusWidth | ( | sdmmchost_t * | host, |
uint32_t | dataBusWidth | ||
) |
host | host handler |
dataBusWidth | data bus width |
|
inlinestatic |
host | host handler |
uint32_t SDMMCHOST_SetCardClock | ( | sdmmchost_t * | host, |
uint32_t | targetClock | ||
) |
host | host handler |
targetClock | target clock frequency |
actual | clock frequency can be reach. |
|
inlinestatic |
host | host handler |
true | is busy, false is idle. |
|
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 |