MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The host adapter driver provide adapter for polling/interrupt/freertos mode.
Data Structures | |
struct | sdmmchost_detect_card_t |
sd card detect More... | |
struct | sdmmchost_pwr_card_t |
card power control More... | |
struct | sdmmchost_card_int_t |
card interrupt application callback More... | |
struct | sdmmchost_card_switch_voltage_func_t |
card switch voltage function collection More... | |
struct | sdmmhostcard_usr_param_t |
card user parameter, user can define the parameter according the board, card capability More... | |
Macros | |
#define | FSL_SDMMC_HOST_ADAPTER_VERSION (MAKE_VERSION(2U, 2U, 13U)) /*2.2.13*/ |
Middleware adapter version. More... | |
#define | SDMMCHOST_NOT_SUPPORT 0U |
use this define to indicate the host not support feature | |
#define | SDMMCHOST_SUPPORT 1U |
use this define to indicate the host support feature | |
#define | kSDMMCHOST_DATABUSWIDTH1BIT kUSDHC_DataBusWidth1Bit |
1-bit mode | |
#define | kSDMMCHOST_DATABUSWIDTH4BIT kUSDHC_DataBusWidth4Bit |
4-bit mode | |
#define | kSDMMCHOST_DATABUSWIDTH8BIT kUSDHC_DataBusWidth8Bit |
8-bit mode | |
#define | SDMMCHOST_STANDARD_TUNING_START (10U) |
standard tuning start point | |
#define | SDMMCHOST_TUINIG_STEP (2U) |
standard tuning step | |
#define | SDMMCHOST_RETUNING_TIMER_COUNT (0U) |
Re-tuning timer. | |
#define | USDHC_READ_BURST_LEN (8U) |
number of words USDHC read in a single burst | |
#define | USDHC_WRITE_BURST_LEN (8U) |
number of words USDHC write in a single burst | |
#define | USDHC_DATA_TIMEOUT (0xFU) |
data timeout counter value | |
Typedefs | |
typedef void(* | sdmmchost_cd_callback_t )(bool isInserted, void *userData) |
card detect callback definition | |
typedef void(* | sdmmchost_pwr_t )(void) |
card power control function pointer | |
typedef void(* | sdmmchost_card_int_callback_t )(void *userData) |
card interrupt function pointer | |
typedef void(* | sdmmchost_card_switch_voltage_t )(void) |
card switch voltage function pointer | |
typedef sdmmhostcard_usr_param_t | sdcard_usr_param_t |
@ brief specifiy card user parameter name | |
Enumerations | |
enum | _host_capability |
USDHC host capability. | |
enum | _sdmmchost_endian_mode { kSDMMCHOST_EndianModeBig = 0U, kSDMMCHOST_EndianModeHalfWordBig = 1U, kSDMMCHOST_EndianModeLittle = 2U } |
host Endian mode corresponding to driver define More... | |
enum | sdmmchost_detect_card_type_t { kSDMMCHOST_DetectCardByGpioCD, kSDMMCHOST_DetectCardByHostCD, kSDMMCHOST_DetectCardByHostDATA3 } |
sd card detect type More... | |
adaptor function | |
static status_t | SDMMCHOST_NotSupport (void *parameter) |
host not support function, this function is used for host not support feature More... | |
status_t | SDMMCHOST_WaitCardDetectStatus (SDMMCHOST_TYPE *hostBase, const sdmmchost_detect_card_t *cd, bool waitCardStatus) |
Detect card insert, only need for SD cases. More... | |
bool | SDMMCHOST_IsCardPresent (void) |
check card is present or not. More... | |
status_t | SDMMCHOST_Init (SDMMCHOST_CONFIG *host, void *userData) |
Init host controller. More... | |
void | SDMMCHOST_Reset (SDMMCHOST_TYPE *base) |
reset host controller. More... | |
void | SDMMCHOST_ErrorRecovery (SDMMCHOST_TYPE *base) |
host controller error recovery. More... | |
void | SDMMCHOST_Deinit (void *host) |
Deinit host controller. 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... | |
void | SDMMCHOST_Delay (uint32_t milliseconds) |
SDMMC host delay function. More... | |
status_t | SDMMCHOST_ReceiveTuningBlock (SDMMCHOST_TYPE *base, uint32_t tuningCmd, uint32_t *revBuf, uint32_t size) |
SDMMC host receive tuning block. More... | |
struct sdmmchost_detect_card_t |
Data Fields | |
sdmmchost_detect_card_type_t | cdType |
card detect type | |
uint32_t | cdTimeOut_ms |
card detect timeout which allow 0 - 0xFFFFFFF, value 0 will return immediately, value 0xFFFFFFFF will block until card is insert | |
sdmmchost_cd_callback_t | cardInserted |
card inserted callback which is meaningful for interrupt case | |
sdmmchost_cd_callback_t | cardRemoved |
card removed callback which is meaningful for interrupt case | |
void * | userData |
user data | |
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_card_int_t |
Data Fields | |
void * | userData |
user data | |
sdmmchost_card_int_callback_t | cardInterrupt |
card int call back | |
struct sdmmchost_card_switch_voltage_func_t |
Data Fields | |
sdmmchost_card_switch_voltage_t | cardSignalLine1V8 |
switch to 1.8v function pointer | |
sdmmchost_card_switch_voltage_t | cardSignalLine3V3 |
switch to 3.3V function pointer | |
struct sdmmhostcard_usr_param_t |
Data Fields | |
const sdmmchost_detect_card_t * | cd |
card detect type | |
const sdmmchost_pwr_card_t * | pwr |
power control configuration | |
const sdmmchost_card_int_t * | cardInt |
call back function for card interrupt | |
const sdmmchost_card_switch_voltage_func_t * | cardVoltage |
card voltage switch function | |
#define FSL_SDMMC_HOST_ADAPTER_VERSION (MAKE_VERSION(2U, 2U, 13U)) /*2.2.13*/ |
|
inlinestatic |
void | parameter ,used to avoid build warning |
kStatus_Fail,host | do not suppport |
status_t SDMMCHOST_WaitCardDetectStatus | ( | SDMMCHOST_TYPE * | hostBase, |
const sdmmchost_detect_card_t * | cd, | ||
bool | waitCardStatus | ||
) |
base | the pointer to host base address |
cd | card detect configuration |
waitCardStatus | status which user want to wait |
kStatus_Success | detect card insert |
kStatus_Fail | card insert event fail |
bool SDMMCHOST_IsCardPresent | ( | void | ) |
true | card is present |
false | card is not present |
status_t SDMMCHOST_Init | ( | SDMMCHOST_CONFIG * | host, |
void * | userData | ||
) |
host | the pointer to host structure in card structure. |
userData | specific user data |
kStatus_Success | host init success |
kStatus_Fail | event fail |
void SDMMCHOST_Reset | ( | SDMMCHOST_TYPE * | base | ) |
host | base address. |
void SDMMCHOST_ErrorRecovery | ( | SDMMCHOST_TYPE * | base | ) |
host | base address. |
void SDMMCHOST_Deinit | ( | void * | host | ) |
host | the pointer to host structure in card structure. |
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. |
void SDMMCHOST_Delay | ( | uint32_t | milliseconds | ) |
milliseconds | delay counter. |
status_t SDMMCHOST_ReceiveTuningBlock | ( | SDMMCHOST_TYPE * | base, |
uint32_t | tuningCmd, | ||
uint32_t * | revBuf, | ||
uint32_t | size | ||
) |
base | host base address. |
tuningCmd,tuning | cmd. |
revBuf | buffer to receive data. |
size | data size to receive. |