RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Usdhc

Data Structures

struct  _usdhc_adma2_descriptor
 Defines the ADMA2 descriptor structure. More...
 
struct  _usdhc_capability
 USDHC capability information. More...
 
struct  _usdhc_boot_config
 Data structure to configure the MMC boot feature. More...
 
struct  _usdhc_config
 Data structure to initialize the USDHC. More...
 
struct  _usdhc_command
 Card command descriptor. More...
 
struct  _usdhc_adma_config
 ADMA configuration. More...
 
struct  _usdhc_scatter_gather_data_list
 Card scatter gather data list. More...
 
struct  _usdhc_scatter_gather_data
 Card scatter gather data descriptor. More...
 
struct  _usdhc_scatter_gather_transfer
 usdhc scatter gather transfer. More...
 
struct  _usdhc_data
 Card data descriptor. More...
 
struct  _usdhc_transfer
 Transfer state. More...
 
struct  _usdhc_transfer_callback
 USDHC callback functions. More...
 
struct  _usdhc_handle
 USDHC handle. More...
 
struct  _usdhc_host
 USDHC host descriptor. More...
 

Variables

uint32_t _usdhc_adma2_descriptor::attribute
 
const uint32_t * _usdhc_adma2_descriptor::address
 
uint32_t _usdhc_capability::sdVersion
 
uint32_t _usdhc_capability::mmcVersion
 
uint32_t _usdhc_capability::maxBlockLength
 
uint32_t _usdhc_capability::maxBlockCount
 
uint32_t _usdhc_capability::flags
 
uint32_t _usdhc_boot_config::ackTimeoutCount
 
usdhc_boot_mode_t _usdhc_boot_config::bootMode
 
uint32_t _usdhc_boot_config::blockCount
 
size_t _usdhc_boot_config::blockSize
 
bool _usdhc_boot_config::enableBootAck
 
bool _usdhc_boot_config::enableAutoStopAtBlockGap
 
uint32_t _usdhc_config::dataTimeout
 
usdhc_endian_mode_t _usdhc_config::endianMode
 
uint8_t _usdhc_config::readWatermarkLevel
 
uint8_t _usdhc_config::writeWatermarkLevel
 
uint8_t _usdhc_config::readBurstLen
 
uint8_t _usdhc_config::writeBurstLen
 
uint32_t _usdhc_command::index
 
uint32_t _usdhc_command::argument
 
usdhc_card_command_type_t _usdhc_command::type
 
usdhc_card_response_type_t _usdhc_command::responseType
 
uint32_t _usdhc_command::response [4U]
 
uint32_t _usdhc_command::responseErrorFlags
 
uint32_t _usdhc_command::flags
 
usdhc_dma_mode_t _usdhc_adma_config::dmaMode
 
usdhc_burst_len_t _usdhc_adma_config::burstLen
 
uint32_t * _usdhc_adma_config::admaTable
 
uint32_t _usdhc_adma_config::admaTableWords
 
uint32_t * _usdhc_scatter_gather_data_list::dataAddr
 
uint32_t _usdhc_scatter_gather_data_list::dataSize
 
struct _usdhc_scatter_gather_data_list_usdhc_scatter_gather_data_list::dataList
 
bool _usdhc_scatter_gather_data::enableAutoCommand12
 
bool _usdhc_scatter_gather_data::enableAutoCommand23
 
bool _usdhc_scatter_gather_data::enableIgnoreError
 
usdhc_transfer_direction_t _usdhc_scatter_gather_data::dataDirection
 
uint8_t _usdhc_scatter_gather_data::dataType
 
size_t _usdhc_scatter_gather_data::blockSize
 
usdhc_scatter_gather_data_list_t _usdhc_scatter_gather_data::sgData
 
usdhc_scatter_gather_data_t_usdhc_scatter_gather_transfer::data
 
usdhc_command_t_usdhc_scatter_gather_transfer::command
 
bool _usdhc_data::enableAutoCommand12
 
bool _usdhc_data::enableAutoCommand23
 
bool _usdhc_data::enableIgnoreError
 
uint8_t _usdhc_data::dataType
 
size_t _usdhc_data::blockSize
 
uint32_t _usdhc_data::blockCount
 
uint32_t * _usdhc_data::rxData
 
const uint32_t * _usdhc_data::txData
 
usdhc_data_t_usdhc_transfer::data
 
usdhc_command_t_usdhc_transfer::command
 
void(* _usdhc_transfer_callback::CardInserted )(USDHC_Type *base, void *userData)
 
void(* _usdhc_transfer_callback::CardRemoved )(USDHC_Type *base, void *userData)
 
void(* _usdhc_transfer_callback::SdioInterrupt )(USDHC_Type *base, void *userData)
 
void(* _usdhc_transfer_callback::BlockGap )(USDHC_Type *base, void *userData)
 
void(* _usdhc_transfer_callback::TransferComplete )(USDHC_Type *base, usdhc_handle_t *handle, status_t status, void *userData)
 
void(* _usdhc_transfer_callback::ReTuning )(USDHC_Type *base, void *userData)
 
usdhc_data_t *volatile _usdhc_handle::data
 
usdhc_command_t *volatile _usdhc_handle::command
 
volatile uint32_t _usdhc_handle::transferredWords
 
usdhc_transfer_callback_t _usdhc_handle::callback
 
void * _usdhc_handle::userData
 
USDHC_Type_usdhc_host::base
 
uint32_t _usdhc_host::sourceClock_Hz
 
usdhc_config_t _usdhc_host::config
 
usdhc_capability_t _usdhc_host::capability
 
usdhc_transfer_function_t _usdhc_host::transfer
 

Driver version

enum  {
  kStatus_USDHC_BusyTransferring = MAKE_STATUS(kStatusGroup_USDHC, 0U) , kStatus_USDHC_PrepareAdmaDescriptorFailed = MAKE_STATUS(kStatusGroup_USDHC, 1U) , kStatus_USDHC_SendCommandFailed = MAKE_STATUS(kStatusGroup_USDHC, 2U) , kStatus_USDHC_TransferDataFailed = MAKE_STATUS(kStatusGroup_USDHC, 3U) ,
  kStatus_USDHC_DMADataAddrNotAlign = MAKE_STATUS(kStatusGroup_USDHC, 4U) , kStatus_USDHC_ReTuningRequest = MAKE_STATUS(kStatusGroup_USDHC, 5U) , kStatus_USDHC_TuningError = MAKE_STATUS(kStatusGroup_USDHC, 6U) , kStatus_USDHC_NotSupport = MAKE_STATUS(kStatusGroup_USDHC, 7U) ,
  kStatus_USDHC_TransferDataComplete = MAKE_STATUS(kStatusGroup_USDHC, 8U) , kStatus_USDHC_SendCommandSuccess = MAKE_STATUS(kStatusGroup_USDHC, 9U) , kStatus_USDHC_TransferDMAComplete = MAKE_STATUS(kStatusGroup_USDHC, 10U)
}
 Enum _usdhc_status. USDHC status. More...
 
enum  {
  kUSDHC_SupportAdmaFlag = USDHC_HOST_CTRL_CAP_ADMAS_MASK , kUSDHC_SupportHighSpeedFlag = USDHC_HOST_CTRL_CAP_HSS_MASK , kUSDHC_SupportDmaFlag = USDHC_HOST_CTRL_CAP_DMAS_MASK , kUSDHC_SupportSuspendResumeFlag = USDHC_HOST_CTRL_CAP_SRS_MASK ,
  kUSDHC_SupportV330Flag = USDHC_HOST_CTRL_CAP_VS33_MASK , kUSDHC_SupportV300Flag = USDHC_HOST_CTRL_CAP_VS30_MASK , kUSDHC_SupportV180Flag = USDHC_HOST_CTRL_CAP_VS18_MASK , kUSDHC_Support4BitFlag = (USDHC_HOST_CTRL_CAP_MBL_SHIFT << 0U) ,
  kUSDHC_Support8BitFlag = (USDHC_HOST_CTRL_CAP_MBL_SHIFT << 1U) , kUSDHC_SupportDDR50Flag = USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_MASK , kUSDHC_SupportSDR104Flag = USDHC_HOST_CTRL_CAP_SDR104_SUPPORT_MASK , kUSDHC_SupportSDR50Flag = USDHC_HOST_CTRL_CAP_SDR50_SUPPORT_MASK
}
 Enum _usdhc_capability_flag. Host controller capabilities flag mask. . More...
 
enum  { kUSDHC_WakeupEventOnCardInt = USDHC_PROT_CTRL_WECINT_MASK , kUSDHC_WakeupEventOnCardInsert = USDHC_PROT_CTRL_WECINS_MASK , kUSDHC_WakeupEventOnCardRemove = USDHC_PROT_CTRL_WECRM_MASK , kUSDHC_WakeupEventsAll }
 Enum _usdhc_wakeup_event. Wakeup event mask. . More...
 
enum  {
  kUSDHC_ResetAll = USDHC_SYS_CTRL_RSTA_MASK , kUSDHC_ResetCommand = USDHC_SYS_CTRL_RSTC_MASK , kUSDHC_ResetData = USDHC_SYS_CTRL_RSTD_MASK , kUSDHC_ResetTuning = USDHC_SYS_CTRL_RSTT_MASK ,
  kUSDHC_ResetsAll = (kUSDHC_ResetAll | kUSDHC_ResetCommand | kUSDHC_ResetData | kUSDHC_ResetTuning)
}
 Enum _usdhc_reset. Reset type mask. . More...
 
enum  {
  kUSDHC_EnableDmaFlag = USDHC_MIX_CTRL_DMAEN_MASK , kUSDHC_CommandTypeSuspendFlag = USDHC_CMD_XFR_TYP_CMDTYP(1U) , kUSDHC_CommandTypeResumeFlag = USDHC_CMD_XFR_TYP_CMDTYP(2U) , kUSDHC_CommandTypeAbortFlag = USDHC_CMD_XFR_TYP_CMDTYP(3U) ,
  kUSDHC_EnableBlockCountFlag = USDHC_MIX_CTRL_BCEN_MASK , kUSDHC_EnableAutoCommand12Flag = USDHC_MIX_CTRL_AC12EN_MASK , kUSDHC_DataReadFlag = USDHC_MIX_CTRL_DTDSEL_MASK , kUSDHC_MultipleBlockFlag = USDHC_MIX_CTRL_MSBSEL_MASK ,
  kUSDHC_EnableAutoCommand23Flag = USDHC_MIX_CTRL_AC23EN_MASK , kUSDHC_ResponseLength136Flag = USDHC_CMD_XFR_TYP_RSPTYP(1U) , kUSDHC_ResponseLength48Flag = USDHC_CMD_XFR_TYP_RSPTYP(2U) , kUSDHC_ResponseLength48BusyFlag = USDHC_CMD_XFR_TYP_RSPTYP(3U) ,
  kUSDHC_EnableCrcCheckFlag = USDHC_CMD_XFR_TYP_CCCEN_MASK , kUSDHC_EnableIndexCheckFlag = USDHC_CMD_XFR_TYP_CICEN_MASK , kUSDHC_DataPresentFlag = USDHC_CMD_XFR_TYP_DPSEL_MASK
}
 Enum _usdhc_transfer_flag. Transfer flag mask. More...
 
enum  {
  kUSDHC_CommandInhibitFlag = USDHC_PRES_STATE_CIHB_MASK , kUSDHC_DataInhibitFlag = USDHC_PRES_STATE_CDIHB_MASK , kUSDHC_DataLineActiveFlag = USDHC_PRES_STATE_DLA_MASK , kUSDHC_SdClockStableFlag = USDHC_PRES_STATE_SDSTB_MASK ,
  kUSDHC_WriteTransferActiveFlag = USDHC_PRES_STATE_WTA_MASK , kUSDHC_ReadTransferActiveFlag = USDHC_PRES_STATE_RTA_MASK , kUSDHC_BufferWriteEnableFlag = USDHC_PRES_STATE_BWEN_MASK , kUSDHC_BufferReadEnableFlag = USDHC_PRES_STATE_BREN_MASK ,
  kUSDHC_ReTuningRequestFlag = USDHC_PRES_STATE_RTR_MASK , kUSDHC_DelaySettingFinishedFlag = USDHC_PRES_STATE_TSCD_MASK , kUSDHC_CardInsertedFlag = USDHC_PRES_STATE_CINST_MASK , kUSDHC_CommandLineLevelFlag = USDHC_PRES_STATE_CLSL_MASK ,
  kUSDHC_Data0LineLevelFlag = 1U << USDHC_PRES_STATE_DLSL_SHIFT , kUSDHC_Data1LineLevelFlag = 1U << (USDHC_PRES_STATE_DLSL_SHIFT + 1U) , kUSDHC_Data2LineLevelFlag = 1U << (USDHC_PRES_STATE_DLSL_SHIFT + 2U) , kUSDHC_Data3LineLevelFlag = 1U << (USDHC_PRES_STATE_DLSL_SHIFT + 3U) ,
  kUSDHC_Data4LineLevelFlag = 1U << (USDHC_PRES_STATE_DLSL_SHIFT + 4U) , kUSDHC_Data5LineLevelFlag = 1U << (USDHC_PRES_STATE_DLSL_SHIFT + 5U) , kUSDHC_Data6LineLevelFlag = 1U << (USDHC_PRES_STATE_DLSL_SHIFT + 6U) , kUSDHC_Data7LineLevelFlag = (int)(1U << (USDHC_PRES_STATE_DLSL_SHIFT + 7U))
}
 Enum _usdhc_present_status_flag. Present status flag mask. . More...
 
enum  {
  kUSDHC_CommandCompleteFlag = USDHC_INT_STATUS_CC_MASK , kUSDHC_DataCompleteFlag = USDHC_INT_STATUS_TC_MASK , kUSDHC_BlockGapEventFlag = USDHC_INT_STATUS_BGE_MASK , kUSDHC_DmaCompleteFlag = USDHC_INT_STATUS_DINT_MASK ,
  kUSDHC_BufferWriteReadyFlag = USDHC_INT_STATUS_BWR_MASK , kUSDHC_BufferReadReadyFlag = USDHC_INT_STATUS_BRR_MASK , kUSDHC_CardInsertionFlag = USDHC_INT_STATUS_CINS_MASK , kUSDHC_CardRemovalFlag = USDHC_INT_STATUS_CRM_MASK ,
  kUSDHC_CardInterruptFlag = USDHC_INT_STATUS_CINT_MASK , kUSDHC_ReTuningEventFlag = USDHC_INT_STATUS_RTE_MASK , kUSDHC_TuningPassFlag = USDHC_INT_STATUS_TP_MASK , kUSDHC_TuningErrorFlag = USDHC_INT_STATUS_TNE_MASK ,
  kUSDHC_CommandTimeoutFlag = USDHC_INT_STATUS_CTOE_MASK , kUSDHC_CommandCrcErrorFlag = USDHC_INT_STATUS_CCE_MASK , kUSDHC_CommandEndBitErrorFlag = USDHC_INT_STATUS_CEBE_MASK , kUSDHC_CommandIndexErrorFlag = USDHC_INT_STATUS_CIE_MASK ,
  kUSDHC_DataTimeoutFlag = USDHC_INT_STATUS_DTOE_MASK , kUSDHC_DataCrcErrorFlag = USDHC_INT_STATUS_DCE_MASK , kUSDHC_DataEndBitErrorFlag = USDHC_INT_STATUS_DEBE_MASK , kUSDHC_AutoCommand12ErrorFlag = USDHC_INT_STATUS_AC12E_MASK ,
  kUSDHC_DmaErrorFlag = USDHC_INT_STATUS_DMAE_MASK , kUSDHC_CommandErrorFlag , kUSDHC_DataErrorFlag , kUSDHC_ErrorFlag = (kUSDHC_CommandErrorFlag | kUSDHC_DataErrorFlag | kUSDHC_DmaErrorFlag) ,
  kUSDHC_DataFlag , kUSDHC_DataDMAFlag = (kUSDHC_DataCompleteFlag | kUSDHC_DataErrorFlag | kUSDHC_DmaErrorFlag) , kUSDHC_CommandFlag = (kUSDHC_CommandErrorFlag | kUSDHC_CommandCompleteFlag) , kUSDHC_CardDetectFlag = (kUSDHC_CardInsertionFlag | kUSDHC_CardRemovalFlag) ,
  kUSDHC_SDR104TuningFlag = (kUSDHC_TuningErrorFlag | kUSDHC_TuningPassFlag | kUSDHC_ReTuningEventFlag) , kUSDHC_AllInterruptFlags
}
 Enum _usdhc_interrupt_status_flag. Interrupt status flag mask. . More...
 
enum  {
  kUSDHC_AutoCommand12NotExecutedFlag = USDHC_AUTOCMD12_ERR_STATUS_AC12NE_MASK , kUSDHC_AutoCommand12TimeoutFlag = USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_MASK , kUSDHC_AutoCommand12EndBitErrorFlag = USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_MASK , kUSDHC_AutoCommand12CrcErrorFlag = USDHC_AUTOCMD12_ERR_STATUS_AC12CE_MASK ,
  kUSDHC_AutoCommand12IndexErrorFlag = USDHC_AUTOCMD12_ERR_STATUS_AC12IE_MASK , kUSDHC_AutoCommand12NotIssuedFlag = USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_MASK
}
 Enum _usdhc_auto_command12_error_status_flag. Auto CMD12 error status flag mask. . More...
 
enum  { kUSDHC_ExecuteTuning = USDHC_AUTOCMD12_ERR_STATUS_EXECUTE_TUNING_MASK , kUSDHC_TuningSampleClockSel }
 Enum _usdhc_standard_tuning. Standard tuning flag. More...
 
enum  { kUSDHC_AdmaLenghMismatchFlag = USDHC_ADMA_ERR_STATUS_ADMALME_MASK , kUSDHC_AdmaDescriptorErrorFlag = USDHC_ADMA_ERR_STATUS_ADMADCE_MASK }
 Enum _usdhc_adma_error_status_flag. ADMA error status flag mask. . More...
 
enum  {
  kUSDHC_AdmaErrorStateStopDma = 0x00U , kUSDHC_AdmaErrorStateFetchDescriptor = 0x01U , kUSDHC_AdmaErrorStateChangeAddress = 0x02U , kUSDHC_AdmaErrorStateTransferData = 0x03U ,
  kUSDHC_AdmaErrorStateInvalidLength = 0x04U , kUSDHC_AdmaErrorStateInvalidDescriptor = 0x08U , kUSDHC_AdmaErrorState
}
 Enum _usdhc_adma_error_state. ADMA error state. More...
 
enum  {
  kUSDHC_ForceEventAutoCommand12NotExecuted , kUSDHC_ForceEventAutoCommand12Timeout = USDHC_FORCE_EVENT_FEVTAC12TOE_MASK , kUSDHC_ForceEventAutoCommand12CrcError = USDHC_FORCE_EVENT_FEVTAC12CE_MASK , kUSDHC_ForceEventEndBitError = USDHC_FORCE_EVENT_FEVTAC12EBE_MASK ,
  kUSDHC_ForceEventAutoCommand12IndexError = USDHC_FORCE_EVENT_FEVTAC12IE_MASK , kUSDHC_ForceEventAutoCommand12NotIssued = USDHC_FORCE_EVENT_FEVTCNIBAC12E_MASK , kUSDHC_ForceEventCommandTimeout = USDHC_FORCE_EVENT_FEVTCTOE_MASK , kUSDHC_ForceEventCommandCrcError = USDHC_FORCE_EVENT_FEVTCCE_MASK ,
  kUSDHC_ForceEventCommandEndBitError = USDHC_FORCE_EVENT_FEVTCEBE_MASK , kUSDHC_ForceEventCommandIndexError = USDHC_FORCE_EVENT_FEVTCIE_MASK , kUSDHC_ForceEventDataTimeout = USDHC_FORCE_EVENT_FEVTDTOE_MASK , kUSDHC_ForceEventDataCrcError = USDHC_FORCE_EVENT_FEVTDCE_MASK ,
  kUSDHC_ForceEventDataEndBitError = USDHC_FORCE_EVENT_FEVTDEBE_MASK , kUSDHC_ForceEventAutoCommand12Error = USDHC_FORCE_EVENT_FEVTAC12E_MASK , kUSDHC_ForceEventCardInt = (int)USDHC_FORCE_EVENT_FEVTCINT_MASK , kUSDHC_ForceEventDmaError = USDHC_FORCE_EVENT_FEVTDMAE_MASK ,
  kUSDHC_ForceEventTuningError = USDHC_FORCE_EVENT_FEVTTNE_MASK , kUSDHC_ForceEventsAll
}
 Enum _usdhc_force_event. Force event bit position. . More...
 
enum  _usdhc_transfer_direction { kUSDHC_TransferDirectionReceive = 1U , kUSDHC_TransferDirectionSend = 0U }
 Data transfer direction. More...
 
enum  _usdhc_data_bus_width { kUSDHC_DataBusWidth1Bit = 0U , kUSDHC_DataBusWidth4Bit = 1U , kUSDHC_DataBusWidth8Bit = 2U }
 Data transfer width. More...
 
enum  _usdhc_endian_mode { kUSDHC_EndianModeBig = 0U , kUSDHC_EndianModeHalfWordBig = 1U , kUSDHC_EndianModeLittle = 2U }
 Endian mode. More...
 
enum  _usdhc_dma_mode { kUSDHC_DmaModeSimple = 0U , kUSDHC_DmaModeAdma1 = 1U , kUSDHC_DmaModeAdma2 = 2U , kUSDHC_ExternalDMA = 3U }
 DMA mode. More...
 
enum  {
  kUSDHC_StopAtBlockGapFlag = USDHC_PROT_CTRL_SABGREQ_MASK , kUSDHC_ReadWaitControlFlag = USDHC_PROT_CTRL_RWCTL_MASK , kUSDHC_InterruptAtBlockGapFlag = USDHC_PROT_CTRL_IABG_MASK , kUSDHC_ReadDoneNo8CLK = USDHC_PROT_CTRL_RD_DONE_NO_8CLK_MASK ,
  kUSDHC_ExactBlockNumberReadFlag = USDHC_PROT_CTRL_NON_EXACT_BLK_RD_MASK
}
 Enum _usdhc_sdio_control_flag. SDIO control flag mask. . More...
 
enum  _usdhc_boot_mode { kUSDHC_BootModeNormal = 0U , kUSDHC_BootModeAlternative = 1U }
 MMC card boot mode. More...
 
enum  _usdhc_card_command_type {
  kCARD_CommandTypeNormal = 0U , kCARD_CommandTypeSuspend = 1U , kCARD_CommandTypeResume = 2U , kCARD_CommandTypeAbort = 3U ,
  kCARD_CommandTypeEmpty = 4U
}
 The command type. More...
 
enum  _usdhc_card_response_type {
  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...
 
enum  {
  kUSDHC_Adma1DescriptorValidFlag = (1U << 0U) , kUSDHC_Adma1DescriptorEndFlag = (1U << 1U) , kUSDHC_Adma1DescriptorInterrupFlag = (1U << 2U) , kUSDHC_Adma1DescriptorActivity1Flag = (1U << 4U) ,
  kUSDHC_Adma1DescriptorActivity2Flag = (1U << 5U) , kUSDHC_Adma1DescriptorTypeNop = (kUSDHC_Adma1DescriptorValidFlag) , kUSDHC_Adma1DescriptorTypeTransfer = (kUSDHC_Adma1DescriptorActivity2Flag | kUSDHC_Adma1DescriptorValidFlag) , kUSDHC_Adma1DescriptorTypeLink ,
  kUSDHC_Adma1DescriptorTypeSetLength = (kUSDHC_Adma1DescriptorActivity1Flag | kUSDHC_Adma1DescriptorValidFlag)
}
 Enum _usdhc_adma1_descriptor_flag. The mask for the control/status field in ADMA1 descriptor. More...
 
enum  {
  kUSDHC_Adma2DescriptorValidFlag = (1U << 0U) , kUSDHC_Adma2DescriptorEndFlag = (1U << 1U) , kUSDHC_Adma2DescriptorInterruptFlag = (1U << 2U) , kUSDHC_Adma2DescriptorActivity1Flag = (1U << 4U) ,
  kUSDHC_Adma2DescriptorActivity2Flag = (1U << 5U) , kUSDHC_Adma2DescriptorTypeNop = (kUSDHC_Adma2DescriptorValidFlag) , kUSDHC_Adma2DescriptorTypeReserved = (kUSDHC_Adma2DescriptorActivity1Flag | kUSDHC_Adma2DescriptorValidFlag) , kUSDHC_Adma2DescriptorTypeTransfer = (kUSDHC_Adma2DescriptorActivity2Flag | kUSDHC_Adma2DescriptorValidFlag) ,
  kUSDHC_Adma2DescriptorTypeLink
}
 Enum _usdhc_adma2_descriptor_flag. ADMA1 descriptor control and status mask. More...
 
enum  { kUSDHC_AdmaDescriptorSingleFlag = 0U , kUSDHC_AdmaDescriptorMultipleFlag }
 Enum _usdhc_adma_flag. ADMA descriptor configuration flag. . More...
 
enum  _usdhc_burst_len { kUSDHC_EnBurstLenForINCR = 0x01U , kUSDHC_EnBurstLenForINCR4816 = 0x02U , kUSDHC_EnBurstLenForINCR4816WRAP = 0x04U }
 DMA transfer burst len config. More...
 
enum  { kUSDHC_TransferDataNormal = 0U , kUSDHC_TransferDataTuning = 1U , kUSDHC_TransferDataBoot = 2U , kUSDHC_TransferDataBootcontinous = 3U }
 Enum _usdhc_transfer_data_type. Tansfer data type definition. More...
 
typedef enum _usdhc_transfer_direction usdhc_transfer_direction_t
 Data transfer direction.
 
typedef enum _usdhc_data_bus_width usdhc_data_bus_width_t
 Data transfer width.
 
typedef enum _usdhc_endian_mode usdhc_endian_mode_t
 Endian mode.
 
typedef enum _usdhc_dma_mode usdhc_dma_mode_t
 DMA mode.
 
typedef enum _usdhc_boot_mode usdhc_boot_mode_t
 MMC card boot mode.
 
typedef enum _usdhc_card_command_type usdhc_card_command_type_t
 The command type.
 
typedef enum _usdhc_card_response_type usdhc_card_response_type_t
 The command response type.
 
typedef enum _usdhc_burst_len usdhc_burst_len_t
 DMA transfer burst len config.
 
typedef uint32_t usdhc_adma1_descriptor_t
 Defines the ADMA1 descriptor structure.
 
typedef struct _usdhc_adma2_descriptor usdhc_adma2_descriptor_t
 Defines the ADMA2 descriptor structure.
 
typedef struct _usdhc_capability usdhc_capability_t
 USDHC capability information.
 
typedef struct _usdhc_boot_config usdhc_boot_config_t
 Data structure to configure the MMC boot feature.
 
typedef struct _usdhc_config usdhc_config_t
 Data structure to initialize the USDHC.
 
typedef struct _usdhc_command usdhc_command_t
 Card command descriptor.
 
typedef struct _usdhc_adma_config usdhc_adma_config_t
 ADMA configuration.
 
typedef struct _usdhc_scatter_gather_data_list usdhc_scatter_gather_data_list_t
 Card scatter gather data list.
 
typedef struct _usdhc_scatter_gather_data usdhc_scatter_gather_data_t
 Card scatter gather data descriptor.
 
typedef struct _usdhc_scatter_gather_transfer usdhc_scatter_gather_transfer_t
 usdhc scatter gather transfer.
 
typedef struct _usdhc_data usdhc_data_t
 Card data descriptor.
 
typedef struct _usdhc_transfer usdhc_transfer_t
 Transfer state.
 
typedef struct _usdhc_handle usdhc_handle_t
 USDHC handle typedef.
 
typedef struct _usdhc_transfer_callback usdhc_transfer_callback_t
 USDHC callback functions.
 
typedef status_t(* usdhc_transfer_function_t) (USDHC_Type *base, usdhc_transfer_t *content)
 USDHC transfer function.
 
typedef struct _usdhc_host usdhc_host_t
 USDHC host descriptor.
 
#define FSL_USDHC_DRIVER_VERSION   (MAKE_VERSION(2U, 8U, 2U))
 Driver version 2.8.2.
 
#define USDHC_MAX_BLOCK_COUNT   (USDHC_BLK_ATT_BLKCNT_MASK >> USDHC_BLK_ATT_BLKCNT_SHIFT)
 Maximum block count can be set one time.
 
#define FSL_USDHC_ENABLE_SCATTER_GATHER_TRANSFER   0U
 USDHC scatter gather feature control macro.
 
#define USDHC_ADMA1_ADDRESS_ALIGN   (4096U)
 The alignment size for ADDRESS filed in ADMA1's descriptor.
 
#define USDHC_ADMA1_LENGTH_ALIGN   (4096U)
 The alignment size for LENGTH field in ADMA1's descriptor.
 
#define USDHC_ADMA2_ADDRESS_ALIGN   (4U)
 The alignment size for ADDRESS field in ADMA2's descriptor.
 
#define USDHC_ADMA2_LENGTH_ALIGN   (4U)
 The alignment size for LENGTH filed in ADMA2's descriptor.
 
#define USDHC_ADMA1_DESCRIPTOR_ADDRESS_SHIFT   (12U)
 The bit shift for ADDRESS filed in ADMA1's descriptor.
 
#define USDHC_ADMA1_DESCRIPTOR_ADDRESS_MASK   (0xFFFFFU)
 The bit mask for ADDRESS field in ADMA1's descriptor.
 
#define USDHC_ADMA1_DESCRIPTOR_LENGTH_SHIFT   (12U)
 The bit shift for LENGTH filed in ADMA1's descriptor.
 
#define USDHC_ADMA1_DESCRIPTOR_LENGTH_MASK   (0xFFFFU)
 The mask for LENGTH field in ADMA1's descriptor.
 
#define USDHC_ADMA1_DESCRIPTOR_MAX_LENGTH_PER_ENTRY   (USDHC_ADMA1_DESCRIPTOR_LENGTH_MASK + 1U - 4096U)
 The maximum value of LENGTH filed in ADMA1's descriptor. Since the max transfer size ADMA1 support is 65535 which is indivisible by 4096, so to make sure a large data load transfer (>64KB) continuously (require the data address be always align with 4096), software will set the maximum data length for ADMA1 to (64 - 4)KB.
 
#define USDHC_ADMA2_DESCRIPTOR_LENGTH_SHIFT   (16U)
 The bit shift for LENGTH field in ADMA2's descriptor.
 
#define USDHC_ADMA2_DESCRIPTOR_LENGTH_MASK   (0xFFFFU)
 The bit mask for LENGTH field in ADMA2's descriptor.
 
#define USDHC_ADMA2_DESCRIPTOR_MAX_LENGTH_PER_ENTRY   (USDHC_ADMA2_DESCRIPTOR_LENGTH_MASK - 3U)
 The maximum value of LENGTH field in ADMA2's descriptor.
 

Initialization and deinitialization

void USDHC_Init (USDHC_Type *base, const usdhc_config_t *config)
 USDHC module initialization function.
 
void USDHC_Deinit (USDHC_Type *base)
 Deinitializes the USDHC.
 
bool USDHC_Reset (USDHC_Type *base, uint32_t mask, uint32_t timeout)
 Resets the USDHC.
 

DMA Control

status_t USDHC_SetAdmaTableConfig (USDHC_Type *base, usdhc_adma_config_t *dmaConfig, usdhc_data_t *dataConfig, uint32_t flags)
 Sets the DMA descriptor table configuration. A high level DMA descriptor configuration function.
 
status_t USDHC_SetInternalDmaConfig (USDHC_Type *base, usdhc_adma_config_t *dmaConfig, const uint32_t *dataAddr, bool enAutoCmd23)
 Internal DMA configuration. This function is used to config the USDHC DMA related registers.
 
status_t USDHC_SetADMA2Descriptor (uint32_t *admaTable, uint32_t admaTableWords, const uint32_t *dataBufferAddr, uint32_t dataBytes, uint32_t flags)
 Sets the ADMA2 descriptor table configuration.
 
status_t USDHC_SetADMA1Descriptor (uint32_t *admaTable, uint32_t admaTableWords, const uint32_t *dataBufferAddr, uint32_t dataBytes, uint32_t flags)
 Sets the ADMA1 descriptor table configuration.
 

Bus Operations

void USDHC_GetCapability (USDHC_Type *base, usdhc_capability_t *capability)
 Gets the capability information.
 
uint32_t USDHC_SetSdClock (USDHC_Type *base, uint32_t srcClock_Hz, uint32_t busClock_Hz)
 Sets the SD bus clock frequency.
 
bool USDHC_SetCardActive (USDHC_Type *base, uint32_t timeout)
 Sends 80 clocks to the card to set it to the active state.
 
void USDHC_SendCommand (USDHC_Type *base, usdhc_command_t *command)
 Sends command function.
 
void USDHC_SetMmcBootConfig (USDHC_Type *base, const usdhc_boot_config_t *config)
 Configures the MMC boot feature.
 
void USDHC_EnableDDRMode (USDHC_Type *base, bool enable, uint32_t nibblePos)
 The enable/disable DDR mode.
 
void USDHC_SetDataConfig (USDHC_Type *base, usdhc_transfer_direction_t dataDirection, uint32_t blockCount, uint32_t blockSize)
 USDHC data configuration.
 

Transactional functions

void USDHC_TransferCreateHandle (USDHC_Type *base, usdhc_handle_t *handle, const usdhc_transfer_callback_t *callback, void *userData)
 Creates the USDHC handle.
 
status_t USDHC_TransferNonBlocking (USDHC_Type *base, usdhc_handle_t *handle, usdhc_adma_config_t *dmaConfig, usdhc_transfer_t *transfer)
 Transfers the command/data using an interrupt and an asynchronous method.
 
status_t USDHC_TransferBlocking (USDHC_Type *base, usdhc_adma_config_t *dmaConfig, usdhc_transfer_t *transfer)
 Transfers the command/data using a blocking method.
 
void USDHC_TransferHandleIRQ (USDHC_Type *base, usdhc_handle_t *handle)
 IRQ handler for the USDHC.
 

Detailed Description

Macro Definition Documentation

◆ USDHC_ADMA1_DESCRIPTOR_ADDRESS_SHIFT

#define USDHC_ADMA1_DESCRIPTOR_ADDRESS_SHIFT   (12U)

The bit shift for ADDRESS filed in ADMA1's descriptor.

ADMA1 descriptor table
Address/page field Reserved Attribute
31 12 11 6 05 04 03 02 01 00
address or data length 000000 Act2 Act1 0 Int End Valid
ADMA2 action
Act2 Act1 Comment 31-28 27-12
0 0 No op Don't care
0 1 Set data length 0000 Data Length
1 0 Transfer data Data address
1 1 Link descriptor Descriptor address

◆ USDHC_ADMA2_DESCRIPTOR_LENGTH_SHIFT

#define USDHC_ADMA2_DESCRIPTOR_LENGTH_SHIFT   (16U)

The bit shift for LENGTH field in ADMA2's descriptor.

ADMA2 descriptor table
Address field Length Reserved Attribute
63 32 31 16 15 06 05 04 03 02 01 00
32-bit address 16-bit length 0000000000 Act2 Act1 0 Int End Valid
ADMA2 action
Act2 Act1 Comment Operation
0 0 No op Don't care
0 1 Reserved Read this line and go to next one
1 0 Transfer data Transfer data with address and length set in this descriptor line
1 1 Link descriptor Link to another descriptor

Typedef Documentation

◆ usdhc_capability_t

USDHC capability information.

Defines a structure to save the capability information of USDHC.

◆ usdhc_card_response_type_t

The command response type.

Defines the command response type from card to host controller.

◆ usdhc_command_t

Card command descriptor.

Defines card command-related attribute.

◆ usdhc_data_t

typedef struct _usdhc_data usdhc_data_t

Card data descriptor.

Defines a structure to contain data-related attribute. The 'enableIgnoreError' is used when upper card driver wants to ignore the error event to read/write all the data and not to stop read/write immediately when an error event happens. For example, bus testing procedure for MMC card.

◆ usdhc_scatter_gather_data_list_t

Card scatter gather data list.

Allow application register uncontinuous data buffer for data transfer.

◆ usdhc_scatter_gather_data_t

Card scatter gather data descriptor.

Defines a structure to contain data-related attribute. The 'enableIgnoreError' is used when upper card driver wants to ignore the error event to read/write all the data and not to stop read/write immediately when an error event happens. For example, bus testing procedure for MMC card.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Enum _usdhc_status. USDHC status.

Enumerator
kStatus_USDHC_BusyTransferring 

Transfer is on-going.

kStatus_USDHC_PrepareAdmaDescriptorFailed 

Set DMA descriptor failed.

kStatus_USDHC_SendCommandFailed 

Send command failed.

kStatus_USDHC_TransferDataFailed 

Transfer data failed.

kStatus_USDHC_DMADataAddrNotAlign 

Data address not aligned.

kStatus_USDHC_ReTuningRequest 

Re-tuning request.

kStatus_USDHC_TuningError 

Tuning error.

kStatus_USDHC_NotSupport 

Not support.

kStatus_USDHC_TransferDataComplete 

Transfer data complete.

kStatus_USDHC_SendCommandSuccess 

Transfer command complete.

kStatus_USDHC_TransferDMAComplete 

Transfer DMA complete.

◆ anonymous enum

anonymous enum

Enum _usdhc_capability_flag. Host controller capabilities flag mask. .

Enumerator
kUSDHC_SupportAdmaFlag 

Support ADMA.

kUSDHC_SupportHighSpeedFlag 

Support high-speed.

kUSDHC_SupportDmaFlag 

Support DMA.

kUSDHC_SupportSuspendResumeFlag 

Support suspend/resume.

kUSDHC_SupportV330Flag 

Support voltage 3.3V.

kUSDHC_SupportV300Flag 

Support voltage 3.0V.

kUSDHC_SupportV180Flag 

Support voltage 1.8V.

kUSDHC_Support4BitFlag 

Flag in HTCAPBLT_MBL's position, supporting 4-bit mode.

kUSDHC_Support8BitFlag 

Flag in HTCAPBLT_MBL's position, supporting 8-bit mode.

kUSDHC_SupportDDR50Flag 

SD version 3.0 new feature, supporting DDR50 mode.

kUSDHC_SupportSDR104Flag 

Support SDR104 mode.

kUSDHC_SupportSDR50Flag 

Support SDR50 mode.

◆ anonymous enum

anonymous enum

Enum _usdhc_wakeup_event. Wakeup event mask. .

Enumerator
kUSDHC_WakeupEventOnCardInt 

Wakeup on card interrupt.

kUSDHC_WakeupEventOnCardInsert 

Wakeup on card insertion.

kUSDHC_WakeupEventOnCardRemove 

Wakeup on card removal.

kUSDHC_WakeupEventsAll 

All wakeup events

◆ anonymous enum

anonymous enum

Enum _usdhc_reset. Reset type mask. .

Enumerator
kUSDHC_ResetAll 

Reset all except card detection.

kUSDHC_ResetCommand 

Reset command line.

kUSDHC_ResetData 

Reset data line.

kUSDHC_ResetTuning 

Reset tuning circuit.

kUSDHC_ResetsAll 

All reset types

◆ anonymous enum

anonymous enum

Enum _usdhc_transfer_flag. Transfer flag mask.

Enumerator
kUSDHC_EnableDmaFlag 

Enable DMA.

kUSDHC_CommandTypeSuspendFlag 

Suspend command.

kUSDHC_CommandTypeResumeFlag 

Resume command.

kUSDHC_CommandTypeAbortFlag 

Abort command.

kUSDHC_EnableBlockCountFlag 

Enable block count.

kUSDHC_EnableAutoCommand12Flag 

Enable auto CMD12.

kUSDHC_DataReadFlag 

Enable data read.

kUSDHC_MultipleBlockFlag 

Multiple block data read/write.

kUSDHC_EnableAutoCommand23Flag 

Enable auto CMD23.

kUSDHC_ResponseLength136Flag 

136-bit response length.

kUSDHC_ResponseLength48Flag 

48-bit response length.

kUSDHC_ResponseLength48BusyFlag 

48-bit response length with busy status.

kUSDHC_EnableCrcCheckFlag 

Enable CRC check.

kUSDHC_EnableIndexCheckFlag 

Enable index check.

kUSDHC_DataPresentFlag 

Data present flag.

◆ anonymous enum

anonymous enum

Enum _usdhc_present_status_flag. Present status flag mask. .

Enumerator
kUSDHC_CommandInhibitFlag 

Command inhibit.

kUSDHC_DataInhibitFlag 

Data inhibit.

kUSDHC_DataLineActiveFlag 

Data line active.

kUSDHC_SdClockStableFlag 

SD bus clock stable.

kUSDHC_WriteTransferActiveFlag 

Write transfer active.

kUSDHC_ReadTransferActiveFlag 

Read transfer active.

kUSDHC_BufferWriteEnableFlag 

Buffer write enable.

kUSDHC_BufferReadEnableFlag 

Buffer read enable.

kUSDHC_ReTuningRequestFlag 

Re-tuning request flag, only used for SDR104 mode.

kUSDHC_DelaySettingFinishedFlag 

Delay setting finished flag.

kUSDHC_CardInsertedFlag 

Card inserted.

kUSDHC_CommandLineLevelFlag 

Command line signal level.

kUSDHC_Data0LineLevelFlag 

Data0 line signal level.

kUSDHC_Data1LineLevelFlag 

Data1 line signal level.

kUSDHC_Data2LineLevelFlag 

Data2 line signal level.

kUSDHC_Data3LineLevelFlag 

Data3 line signal level.

kUSDHC_Data4LineLevelFlag 

Data4 line signal level.

kUSDHC_Data5LineLevelFlag 

Data5 line signal level.

kUSDHC_Data6LineLevelFlag 

Data6 line signal level.

kUSDHC_Data7LineLevelFlag 

Data7 line signal level.

◆ anonymous enum

anonymous enum

Enum _usdhc_interrupt_status_flag. Interrupt status flag mask. .

Enumerator
kUSDHC_CommandCompleteFlag 

Command complete.

kUSDHC_DataCompleteFlag 

Data complete.

kUSDHC_BlockGapEventFlag 

Block gap event.

kUSDHC_DmaCompleteFlag 

DMA interrupt.

kUSDHC_BufferWriteReadyFlag 

Buffer write ready.

kUSDHC_BufferReadReadyFlag 

Buffer read ready.

kUSDHC_CardInsertionFlag 

Card inserted.

kUSDHC_CardRemovalFlag 

Card removed.

kUSDHC_CardInterruptFlag 

Card interrupt.

kUSDHC_ReTuningEventFlag 

Re-Tuning event, only for SD3.0 SDR104 mode.

kUSDHC_TuningPassFlag 

SDR104 mode tuning pass flag.

kUSDHC_TuningErrorFlag 

SDR104 tuning error flag.

kUSDHC_CommandTimeoutFlag 

Command timeout error.

kUSDHC_CommandCrcErrorFlag 

Command CRC error.

kUSDHC_CommandEndBitErrorFlag 

Command end bit error.

kUSDHC_CommandIndexErrorFlag 

Command index error.

kUSDHC_DataTimeoutFlag 

Data timeout error.

kUSDHC_DataCrcErrorFlag 

Data CRC error.

kUSDHC_DataEndBitErrorFlag 

Data end bit error.

kUSDHC_AutoCommand12ErrorFlag 

Auto CMD12 error.

kUSDHC_DmaErrorFlag 

DMA error.

kUSDHC_CommandErrorFlag 

Command error

kUSDHC_DataErrorFlag 

Data error

kUSDHC_ErrorFlag 

All error

kUSDHC_DataFlag 

Data interrupts

kUSDHC_DataDMAFlag 

Data interrupts

kUSDHC_CommandFlag 

Command interrupts

kUSDHC_CardDetectFlag 

Card detection interrupts

kUSDHC_SDR104TuningFlag 

SDR104 tuning flag.

kUSDHC_AllInterruptFlags 

All flags mask

◆ anonymous enum

anonymous enum

Enum _usdhc_auto_command12_error_status_flag. Auto CMD12 error status flag mask. .

Enumerator
kUSDHC_AutoCommand12NotExecutedFlag 

Not executed error.

kUSDHC_AutoCommand12TimeoutFlag 

Timeout error.

kUSDHC_AutoCommand12EndBitErrorFlag 

End bit error.

kUSDHC_AutoCommand12CrcErrorFlag 

CRC error.

kUSDHC_AutoCommand12IndexErrorFlag 

Index error.

kUSDHC_AutoCommand12NotIssuedFlag 

Not issued error.

◆ anonymous enum

anonymous enum

Enum _usdhc_standard_tuning. Standard tuning flag.

Enumerator
kUSDHC_ExecuteTuning 

Used to start tuning procedure.

kUSDHC_TuningSampleClockSel 

When std_tuning_en bit is set, this bit is used to select sampleing clock.

◆ anonymous enum

anonymous enum

Enum _usdhc_adma_error_status_flag. ADMA error status flag mask. .

Enumerator
kUSDHC_AdmaLenghMismatchFlag 

Length mismatch error.

kUSDHC_AdmaDescriptorErrorFlag 

Descriptor error.

◆ anonymous enum

anonymous enum

Enum _usdhc_adma_error_state. ADMA error state.

This state is the detail state when ADMA error has occurred.

Enumerator
kUSDHC_AdmaErrorStateStopDma 

Stop DMA, previous location set in the ADMA system address is errored address.

kUSDHC_AdmaErrorStateFetchDescriptor 

Fetch descriptor, current location set in the ADMA system address is errored address.

kUSDHC_AdmaErrorStateChangeAddress 

Change address, no DMA error has occurred.

kUSDHC_AdmaErrorStateTransferData 

Transfer data, previous location set in the ADMA system address is errored address.

kUSDHC_AdmaErrorStateInvalidLength 

Invalid length in ADMA descriptor.

kUSDHC_AdmaErrorStateInvalidDescriptor 

Invalid descriptor fetched by ADMA.

kUSDHC_AdmaErrorState 

ADMA error state

◆ anonymous enum

anonymous enum

Enum _usdhc_force_event. Force event bit position. .

Enumerator
kUSDHC_ForceEventAutoCommand12NotExecuted 

Auto CMD12 not executed error.

kUSDHC_ForceEventAutoCommand12Timeout 

Auto CMD12 timeout error.

kUSDHC_ForceEventAutoCommand12CrcError 

Auto CMD12 CRC error.

kUSDHC_ForceEventEndBitError 

Auto CMD12 end bit error.

kUSDHC_ForceEventAutoCommand12IndexError 

Auto CMD12 index error.

kUSDHC_ForceEventAutoCommand12NotIssued 

Auto CMD12 not issued error.

kUSDHC_ForceEventCommandTimeout 

Command timeout error.

kUSDHC_ForceEventCommandCrcError 

Command CRC error.

kUSDHC_ForceEventCommandEndBitError 

Command end bit error.

kUSDHC_ForceEventCommandIndexError 

Command index error.

kUSDHC_ForceEventDataTimeout 

Data timeout error.

kUSDHC_ForceEventDataCrcError 

Data CRC error.

kUSDHC_ForceEventDataEndBitError 

Data end bit error.

kUSDHC_ForceEventAutoCommand12Error 

Auto CMD12 error.

kUSDHC_ForceEventCardInt 

Card interrupt.

kUSDHC_ForceEventDmaError 

Dma error.

kUSDHC_ForceEventTuningError 

Tuning error.

kUSDHC_ForceEventsAll 

All force event flags mask.

◆ anonymous enum

anonymous enum

Enum _usdhc_sdio_control_flag. SDIO control flag mask. .

Enumerator
kUSDHC_StopAtBlockGapFlag 

Stop at block gap.

kUSDHC_ReadWaitControlFlag 

Read wait control.

kUSDHC_InterruptAtBlockGapFlag 

Interrupt at block gap.

kUSDHC_ReadDoneNo8CLK 

Read done without 8 clk for block gap.

kUSDHC_ExactBlockNumberReadFlag 

Exact block number read.

◆ anonymous enum

anonymous enum

Enum _usdhc_adma1_descriptor_flag. The mask for the control/status field in ADMA1 descriptor.

Enumerator
kUSDHC_Adma1DescriptorValidFlag 

Valid flag.

kUSDHC_Adma1DescriptorEndFlag 

End flag.

kUSDHC_Adma1DescriptorInterrupFlag 

Interrupt flag.

kUSDHC_Adma1DescriptorActivity1Flag 

Activity 1 flag.

kUSDHC_Adma1DescriptorActivity2Flag 

Activity 2 flag.

kUSDHC_Adma1DescriptorTypeNop 

No operation.

kUSDHC_Adma1DescriptorTypeTransfer 

Transfer data.

kUSDHC_Adma1DescriptorTypeLink 

Link descriptor.

kUSDHC_Adma1DescriptorTypeSetLength 

Set data length.

◆ anonymous enum

anonymous enum

Enum _usdhc_adma2_descriptor_flag. ADMA1 descriptor control and status mask.

Enumerator
kUSDHC_Adma2DescriptorValidFlag 

Valid flag.

kUSDHC_Adma2DescriptorEndFlag 

End flag.

kUSDHC_Adma2DescriptorInterruptFlag 

Interrupt flag.

kUSDHC_Adma2DescriptorActivity1Flag 

Activity 1 mask.

kUSDHC_Adma2DescriptorActivity2Flag 

Activity 2 mask.

kUSDHC_Adma2DescriptorTypeNop 

No operation.

kUSDHC_Adma2DescriptorTypeReserved 

Reserved.

kUSDHC_Adma2DescriptorTypeTransfer 

Transfer type.

kUSDHC_Adma2DescriptorTypeLink 

Link type.

◆ anonymous enum

anonymous enum

Enum _usdhc_adma_flag. ADMA descriptor configuration flag. .

Enumerator
kUSDHC_AdmaDescriptorSingleFlag 

Try to finish the transfer in a single ADMA descriptor. If transfer size is bigger than one ADMA descriptor's ability, new another descriptor for data transfer.

kUSDHC_AdmaDescriptorMultipleFlag 

Create multiple ADMA descriptors within the ADMA table, this is used for mmc boot mode specifically, which need to modify the ADMA descriptor on the fly, so the flag should be used combining with stop at block gap feature.

◆ anonymous enum

anonymous enum

Enum _usdhc_transfer_data_type. Tansfer data type definition.

Enumerator
kUSDHC_TransferDataNormal 

Transfer normal read/write data.

kUSDHC_TransferDataTuning 

Transfer tuning data.

kUSDHC_TransferDataBoot 

Transfer boot data.

kUSDHC_TransferDataBootcontinous 

Transfer boot data continuously.

◆ _usdhc_boot_mode

MMC card boot mode.

Enumerator
kUSDHC_BootModeNormal 

Normal boot

kUSDHC_BootModeAlternative 

Alternative boot

◆ _usdhc_burst_len

DMA transfer burst len config.

Enumerator
kUSDHC_EnBurstLenForINCR 

Enable burst len for INCR.

kUSDHC_EnBurstLenForINCR4816 

Enable burst len for INCR4/INCR8/INCR16.

kUSDHC_EnBurstLenForINCR4816WRAP 

Enable burst len for INCR4/8/16 WRAP.

◆ _usdhc_card_command_type

The command type.

Enumerator
kCARD_CommandTypeNormal 

Normal command

kCARD_CommandTypeSuspend 

Suspend command

kCARD_CommandTypeResume 

Resume command

kCARD_CommandTypeAbort 

Abort command

kCARD_CommandTypeEmpty 

Empty command

◆ _usdhc_card_response_type

The command response type.

Defines the command response type from card to host controller.

Enumerator
kCARD_ResponseTypeNone 

Response type: none

kCARD_ResponseTypeR1 

Response type: R1

kCARD_ResponseTypeR1b 

Response type: R1b

kCARD_ResponseTypeR2 

Response type: R2

kCARD_ResponseTypeR3 

Response type: R3

kCARD_ResponseTypeR4 

Response type: R4

kCARD_ResponseTypeR5 

Response type: R5

kCARD_ResponseTypeR5b 

Response type: R5b

kCARD_ResponseTypeR6 

Response type: R6

kCARD_ResponseTypeR7 

Response type: R7

◆ _usdhc_data_bus_width

Data transfer width.

Enumerator
kUSDHC_DataBusWidth1Bit 

1-bit mode

kUSDHC_DataBusWidth4Bit 

4-bit mode

kUSDHC_DataBusWidth8Bit 

8-bit mode

◆ _usdhc_dma_mode

DMA mode.

Enumerator
kUSDHC_DmaModeSimple 

External DMA.

kUSDHC_DmaModeAdma1 

ADMA1 is selected.

kUSDHC_DmaModeAdma2 

ADMA2 is selected.

kUSDHC_ExternalDMA 

External DMA mode selected.

◆ _usdhc_endian_mode

Endian mode.

Enumerator
kUSDHC_EndianModeBig 

Big endian mode.

kUSDHC_EndianModeHalfWordBig 

Half word big endian mode.

kUSDHC_EndianModeLittle 

Little endian mode.

◆ _usdhc_transfer_direction

Data transfer direction.

Enumerator
kUSDHC_TransferDirectionReceive 

USDHC transfer direction receive.

kUSDHC_TransferDirectionSend 

USDHC transfer direction send.

Function Documentation

◆ USDHC_Deinit()

void USDHC_Deinit ( USDHC_Type base)

Deinitializes the USDHC.

Parameters
baseUSDHC peripheral base address.

brief Deinitializes the USDHC.

param base USDHC peripheral base address.

◆ USDHC_EnableDDRMode()

void USDHC_EnableDDRMode ( USDHC_Type base,
bool  enable,
uint32_t  nibblePos 
)

The enable/disable DDR mode.

Parameters
baseUSDHC peripheral base address.
enableenable/disable flag
nibblePosnibble position

brief the enable/disable DDR mode

param base USDHC peripheral base address. param enable/disable flag param nibble position

◆ USDHC_GetCapability()

void USDHC_GetCapability ( USDHC_Type base,
usdhc_capability_t capability 
)

Gets the capability information.

Parameters
baseUSDHC peripheral base address.
capabilityStructure to save capability information.

brief Gets the capability information.

param base USDHC peripheral base address. param capability Structure to save capability information.

◆ USDHC_Init()

void USDHC_Init ( USDHC_Type base,
const usdhc_config_t config 
)

USDHC module initialization function.

Configures the USDHC according to the user configuration.

Example:

config.cardDetectDat3 = false;
config.readWatermarkLevel = 128U;
config.writeWatermarkLevel = 128U;
USDHC_Init(USDHC, &config);
void USDHC_Init(USDHC_Type *base, const usdhc_config_t *config)
USDHC module initialization function.
Definition: fsl_usdhc.c:831
@ kUSDHC_DmaModeAdma2
Definition: fsl_usdhc.h:352
@ kUSDHC_EndianModeLittle
Definition: fsl_usdhc.h:344
Data structure to initialize the USDHC.
Definition: fsl_usdhc.h:618
Definition: deflate.c:114
Parameters
baseUSDHC peripheral base address.
configUSDHC configuration information.
Return values
kStatus_SuccessOperate successfully.

brief USDHC module initialization function.

Configures the USDHC according to the user configuration.

Example: code usdhc_config_t config; config.cardDetectDat3 = false; config.endianMode = kUSDHC_EndianModeLittle; config.dmaMode = kUSDHC_DmaModeAdma2; config.readWatermarkLevel = 128U; config.writeWatermarkLevel = 128U; USDHC_Init(USDHC, &config); endcode

param base USDHC peripheral base address. param config USDHC configuration information. retval kStatus_Success Operate successfully.

◆ USDHC_Reset()

bool USDHC_Reset ( USDHC_Type base,
uint32_t  mask,
uint32_t  timeout 
)

Resets the USDHC.

Parameters
baseUSDHC peripheral base address.
maskThe reset type mask(_usdhc_reset).
timeoutTimeout for reset.
Return values
trueReset successfully.
falseReset failed.

brief Resets the USDHC.

param base USDHC peripheral base address. param mask The reset type mask(_usdhc_reset). param timeout Timeout for reset. retval true Reset successfully. retval false Reset failed.

◆ USDHC_SendCommand()

void USDHC_SendCommand ( USDHC_Type base,
usdhc_command_t command 
)

Sends command function.

Parameters
baseUSDHC peripheral base address.
commandconfiguration

brief send command function

param base USDHC peripheral base address. param command configuration

◆ USDHC_SetADMA1Descriptor()

status_t USDHC_SetADMA1Descriptor ( uint32_t *  admaTable,
uint32_t  admaTableWords,
const uint32_t *  dataBufferAddr,
uint32_t  dataBytes,
uint32_t  flags 
)

Sets the ADMA1 descriptor table configuration.

Parameters
admaTableADMA table address.
admaTableWordsADMA table length.
dataBufferAddrData buffer address.
dataBytesData length.
flagsADAM descriptor flag, used to indicate to create multiple or single descriptor, please refer to enum _usdhc_adma_flag.
Return values
kStatus_OutOfRangeADMA descriptor table length isn't enough to describe data.
kStatus_SuccessOperate successfully.

brief Sets the ADMA1 descriptor table configuration.

param admaTable Adma table address. param admaTableWords Adma table length. param dataBufferAddr Data buffer address. param dataBytes Data length. param flags ADAM descriptor flag, used to indicate to create multiple or single descriptor, please reference _usdhc_adma_flag. retval kStatus_OutOfRange ADMA descriptor table length isn't enough to describe data. retval kStatus_Success Operate successfully.

◆ USDHC_SetADMA2Descriptor()

status_t USDHC_SetADMA2Descriptor ( uint32_t *  admaTable,
uint32_t  admaTableWords,
const uint32_t *  dataBufferAddr,
uint32_t  dataBytes,
uint32_t  flags 
)

Sets the ADMA2 descriptor table configuration.

Parameters
admaTableADMA table address.
admaTableWordsADMA table length.
dataBufferAddrData buffer address.
dataBytesData Data length.
flagsADAM descriptor flag, used to indicate to create multiple or single descriptor, please refer to enum _usdhc_adma_flag.
Return values
kStatus_OutOfRangeADMA descriptor table length isn't enough to describe data.
kStatus_SuccessOperate successfully.

brief Sets the ADMA2 descriptor table configuration.

param admaTable Adma table address. param admaTableWords Adma table length. param dataBufferAddr Data buffer address. param dataBytes Data Data length. param flags ADAM descriptor flag, used to indicate to create multiple or single descriptor, please reference _usdhc_adma_flag. retval kStatus_OutOfRange ADMA descriptor table length isn't enough to describe data. retval kStatus_Success Operate successfully.

◆ USDHC_SetAdmaTableConfig()

status_t USDHC_SetAdmaTableConfig ( USDHC_Type base,
usdhc_adma_config_t dmaConfig,
usdhc_data_t dataConfig,
uint32_t  flags 
)

Sets the DMA descriptor table configuration. A high level DMA descriptor configuration function.

Parameters
baseUSDHC peripheral base address.
dmaConfigADMA configuration
dataConfigData descriptor
flagsADAM descriptor flag, used to indicate to create multiple or single descriptor, please refer to enum _usdhc_adma_flag.
Return values
kStatus_OutOfRangeADMA descriptor table length isn't enough to describe data.
kStatus_SuccessOperate successfully.

brief Sets the DMA descriptor table configuration. A high level DMA descriptor configuration function. param base USDHC peripheral base address. param adma configuration param data Data descriptor param flags ADAM descriptor flag, used to indicate to create multiple or single descriptor, please reference _usdhc_adma_flag retval kStatus_OutOfRange ADMA descriptor table length isn't enough to describe data. retval kStatus_Success Operate successfully.

◆ USDHC_SetCardActive()

bool USDHC_SetCardActive ( USDHC_Type base,
uint32_t  timeout 
)

Sends 80 clocks to the card to set it to the active state.

This function must be called each time the card is inserted to ensure that the card can receive the command correctly.

Parameters
baseUSDHC peripheral base address.
timeoutTimeout to initialize card.
Return values
trueSet card active successfully.
falseSet card active failed.

brief Sends 80 clocks to the card to set it to the active state.

This function must be called each time the card is inserted to ensure that the card can receive the command correctly.

param base USDHC peripheral base address. param timeout Timeout to initialize card. retval true Set card active successfully. retval false Set card active failed.

◆ USDHC_SetDataConfig()

void USDHC_SetDataConfig ( USDHC_Type base,
usdhc_transfer_direction_t  dataDirection,
uint32_t  blockCount,
uint32_t  blockSize 
)

USDHC data configuration.

Parameters
baseUSDHC peripheral base address.
dataDirectionData direction, tx or rx.
blockCountData block count.
blockSizeData block size.

◆ USDHC_SetInternalDmaConfig()

status_t USDHC_SetInternalDmaConfig ( USDHC_Type base,
usdhc_adma_config_t dmaConfig,
const uint32_t *  dataAddr,
bool  enAutoCmd23 
)

Internal DMA configuration. This function is used to config the USDHC DMA related registers.

Parameters
baseUSDHC peripheral base address.
dmaConfigADMA configuration.
dataAddrTransfer data address, a simple DMA parameter, if ADMA is used, leave it to NULL.
enAutoCmd23Flag to indicate Auto CMD23 is enable or not, a simple DMA parameter, if ADMA is used, leave it to false.
Return values
kStatus_OutOfRangeADMA descriptor table length isn't enough to describe data.
kStatus_SuccessOperate successfully.

brief Internal DMA configuration. This function is used to config the USDHC DMA related registers. param base USDHC peripheral base address. param adma configuration param dataAddr transfer data address, a simple DMA parameter, if ADMA is used, leave it to NULL. param enAutoCmd23 flag to indicate Auto CMD23 is enable or not, a simple DMA parameter,if ADMA is used, leave it to false. retval kStatus_OutOfRange ADMA descriptor table length isn't enough to describe data. retval kStatus_Success Operate successfully.

◆ USDHC_SetMmcBootConfig()

void USDHC_SetMmcBootConfig ( USDHC_Type base,
const usdhc_boot_config_t config 
)

Configures the MMC boot feature.

Example:

config.ackTimeoutCount = 4;
config.blockCount = 5;
config.enableBootAck = true;
config.enableBoot = true;
config.enableAutoStopAtBlockGap = true;
void USDHC_SetMmcBootConfig(USDHC_Type *base, const usdhc_boot_config_t *config)
Configures the MMC boot feature.
Definition: fsl_usdhc.c:1171
@ kUSDHC_BootModeNormal
Definition: fsl_usdhc.h:371
Data structure to configure the MMC boot feature.
Definition: fsl_usdhc.h:607
Parameters
baseUSDHC peripheral base address.
configThe MMC boot configuration information.

brief Configures the MMC boot feature.

Example: code usdhc_boot_config_t config; config.ackTimeoutCount = 4; config.bootMode = kUSDHC_BootModeNormal; config.blockCount = 5; config.enableBootAck = true; config.enableBoot = true; config.enableAutoStopAtBlockGap = true; USDHC_SetMmcBootConfig(USDHC, &config); endcode

param base USDHC peripheral base address. param config The MMC boot configuration information.

◆ USDHC_SetSdClock()

uint32_t USDHC_SetSdClock ( USDHC_Type base,
uint32_t  srcClock_Hz,
uint32_t  busClock_Hz 
)

Sets the SD bus clock frequency.

Parameters
baseUSDHC peripheral base address.
srcClock_HzUSDHC source clock frequency united in Hz.
busClock_HzSD bus clock frequency united in Hz.
Returns
The nearest frequency of busClock_Hz configured for SD bus.

brief Sets the SD bus clock frequency.

param base USDHC peripheral base address. param srcClock_Hz USDHC source clock frequency united in Hz. param busClock_Hz SD bus clock frequency united in Hz.

return The nearest frequency of busClock_Hz configured to SD bus.

◆ USDHC_TransferBlocking()

status_t USDHC_TransferBlocking ( USDHC_Type base,
usdhc_adma_config_t dmaConfig,
usdhc_transfer_t transfer 
)

Transfers the command/data using a blocking method.

This function waits until the command response/data is received or the USDHC encounters an error by polling the status flag.
The application must not call this API in multiple threads at the same time. Because this API doesn't support the re-entry mechanism.

Note
There is no need to call API USDHC_TransferCreateHandle when calling this API.
Parameters
baseUSDHC peripheral base address.
dmaConfigadma configuration
transferTransfer content.
Return values
kStatus_InvalidArgumentArgument is invalid.
kStatus_USDHC_PrepareAdmaDescriptorFailedPrepare ADMA descriptor failed.
kStatus_USDHC_SendCommandFailedSend command failed.
kStatus_USDHC_TransferDataFailedTransfer data failed.
kStatus_SuccessOperate successfully.

brief Transfers the command/data using a blocking method.

This function waits until the command response/data is received or the USDHC encounters an error by polling the status flag. The application must not call this API in multiple threads at the same time. Because of that this API doesn't support the re-entry mechanism.

note There is no need to call the API 'USDHC_TransferCreateHandle' when calling this API.

param base USDHC peripheral base address. param adma configuration param transfer Transfer content. retval kStatus_InvalidArgument Argument is invalid. retval kStatus_USDHC_PrepareAdmaDescriptorFailed Prepare ADMA descriptor failed. retval kStatus_USDHC_SendCommandFailed Send command failed. retval kStatus_USDHC_TransferDataFailed Transfer data failed. retval kStatus_Success Operate successfully.

◆ USDHC_TransferCreateHandle()

void USDHC_TransferCreateHandle ( USDHC_Type base,
usdhc_handle_t handle,
const usdhc_transfer_callback_t callback,
void *  userData 
)

Creates the USDHC handle.

Parameters
baseUSDHC peripheral base address.
handleUSDHC handle pointer.
callbackStructure pointer to contain all callback functions.
userDataCallback function parameter.

brief Creates the USDHC handle.

param base USDHC peripheral base address. param handle USDHC handle pointer. param callback Structure pointer to contain all callback functions. param userData Callback function parameter.

◆ USDHC_TransferHandleIRQ()

void USDHC_TransferHandleIRQ ( USDHC_Type base,
usdhc_handle_t handle 
)

IRQ handler for the USDHC.

This function deals with the IRQs on the given host controller.

Parameters
baseUSDHC peripheral base address.
handleUSDHC handle.

brief IRQ handler for the USDHC.

This function deals with the IRQs on the given host controller.

param base USDHC peripheral base address. param handle USDHC handle.

◆ USDHC_TransferNonBlocking()

status_t USDHC_TransferNonBlocking ( USDHC_Type base,
usdhc_handle_t handle,
usdhc_adma_config_t dmaConfig,
usdhc_transfer_t transfer 
)

Transfers the command/data using an interrupt and an asynchronous method.

This function sends a command and data and returns immediately. It doesn't wait for the transfer to complete or to encounter an error. The application must not call this API in multiple threads at the same time. Because of that this API doesn't support the re-entry mechanism.

Note
Call API USDHC_TransferCreateHandle when calling this API.
Parameters
baseUSDHC peripheral base address.
handleUSDHC handle.
dmaConfigADMA configuration.
transferTransfer content.
Return values
kStatus_InvalidArgumentArgument is invalid.
kStatus_USDHC_BusyTransferringBusy transferring.
kStatus_USDHC_PrepareAdmaDescriptorFailedPrepare ADMA descriptor failed.
kStatus_SuccessOperate successfully.

brief Transfers the command/data using an interrupt and an asynchronous method.

This function sends a command and data and returns immediately. It doesn't wait the transfer complete or encounter an error. The application must not call this API in multiple threads at the same time. Because of that this API doesn't support the re-entry mechanism.

note Call the API 'USDHC_TransferCreateHandle' when calling this API.

param base USDHC peripheral base address. param handle USDHC handle. param adma configuration. param transfer Transfer content. retval kStatus_InvalidArgument Argument is invalid. retval kStatus_USDHC_BusyTransferring Busy transferring. retval kStatus_USDHC_PrepareAdmaDescriptorFailed Prepare ADMA descriptor failed. retval kStatus_Success Operate successfully.

Variable Documentation

◆ ackTimeoutCount

uint32_t _usdhc_boot_config::ackTimeoutCount

Timeout value for the boot ACK. The available range is 0 ~ 15.

◆ address

const uint32_t* _usdhc_adma2_descriptor::address

The address field.

◆ admaTable

uint32_t* _usdhc_adma_config::admaTable

ADMA table address, can't be null if transfer way is ADMA1/ADMA2.

◆ admaTableWords

uint32_t _usdhc_adma_config::admaTableWords

ADMA table length united as words, can't be 0 if transfer way is ADMA1/ADMA2.

◆ argument

uint32_t _usdhc_command::argument

Command argument.

◆ attribute

uint32_t _usdhc_adma2_descriptor::attribute

The control and status field.

◆ base

USDHC_Type* _usdhc_host::base

USDHC peripheral base address.

◆ blockCount [1/2]

uint32_t _usdhc_boot_config::blockCount

Stop at block gap value of automatic mode. Available range is 0 ~ 65535.

◆ blockCount [2/2]

uint32_t _usdhc_data::blockCount

Block count.

◆ BlockGap

void(* _usdhc_transfer_callback::BlockGap) (USDHC_Type *base, void *userData)

stopped at block gap event

◆ blockSize [1/3]

size_t _usdhc_boot_config::blockSize

Block size.

◆ blockSize [2/3]

size_t _usdhc_scatter_gather_data::blockSize

Block size.

◆ blockSize [3/3]

size_t _usdhc_data::blockSize

Block size.

◆ bootMode

usdhc_boot_mode_t _usdhc_boot_config::bootMode

Boot mode selection.

◆ burstLen

usdhc_burst_len_t _usdhc_adma_config::burstLen

Burst len config.

◆ callback

usdhc_transfer_callback_t _usdhc_handle::callback

Callback function.

◆ capability

usdhc_capability_t _usdhc_host::capability

USDHC capability information.

◆ CardInserted

void(* _usdhc_transfer_callback::CardInserted) (USDHC_Type *base, void *userData)

Card inserted occurs when DAT3/CD pin is for card detect

◆ CardRemoved

void(* _usdhc_transfer_callback::CardRemoved) (USDHC_Type *base, void *userData)

Card removed occurs

◆ command [1/3]

usdhc_command_t* _usdhc_scatter_gather_transfer::command

Command to send.

◆ command [2/3]

usdhc_command_t* _usdhc_transfer::command

Command to send.

◆ command [3/3]

usdhc_command_t* volatile _usdhc_handle::command

Transfer parameter. Command to send.

◆ config

usdhc_config_t _usdhc_host::config

USDHC configuration.

◆ data [1/3]

usdhc_scatter_gather_data_t* _usdhc_scatter_gather_transfer::data

Data to transfer.

◆ data [2/3]

usdhc_data_t* _usdhc_transfer::data

Data to transfer.

◆ data [3/3]

usdhc_data_t* volatile _usdhc_handle::data

Transfer parameter. Data to transfer.

◆ dataDirection

usdhc_transfer_direction_t _usdhc_scatter_gather_data::dataDirection

data direction

◆ dataTimeout

uint32_t _usdhc_config::dataTimeout

Data timeout value.

◆ dataType [1/2]

uint8_t _usdhc_scatter_gather_data::dataType

this is used to distinguish the normal/tuning/boot data.

◆ dataType [2/2]

uint8_t _usdhc_data::dataType

this is used to distinguish the normal/tuning/boot data.

◆ dmaMode

usdhc_dma_mode_t _usdhc_adma_config::dmaMode

DMA mode.

◆ enableAutoCommand12 [1/2]

bool _usdhc_scatter_gather_data::enableAutoCommand12

Enable auto CMD12.

◆ enableAutoCommand12 [2/2]

bool _usdhc_data::enableAutoCommand12

Enable auto CMD12.

◆ enableAutoCommand23 [1/2]

bool _usdhc_scatter_gather_data::enableAutoCommand23

Enable auto CMD23.

◆ enableAutoCommand23 [2/2]

bool _usdhc_data::enableAutoCommand23

Enable auto CMD23.

◆ enableAutoStopAtBlockGap

bool _usdhc_boot_config::enableAutoStopAtBlockGap

Enable or disable auto stop at block gap function in boot period.

◆ enableBootAck

bool _usdhc_boot_config::enableBootAck

Enable or disable boot ACK.

◆ enableIgnoreError [1/2]

bool _usdhc_scatter_gather_data::enableIgnoreError

Enable to ignore error event to read/write all the data.

◆ enableIgnoreError [2/2]

bool _usdhc_data::enableIgnoreError

Enable to ignore error event to read/write all the data.

◆ endianMode

usdhc_endian_mode_t _usdhc_config::endianMode

Endian mode.

◆ flags [1/2]

uint32_t _usdhc_capability::flags

Capability flags to indicate the support information(_usdhc_capability_flag).

◆ flags [2/2]

uint32_t _usdhc_command::flags

Cmd flags.

◆ index

uint32_t _usdhc_command::index

Command index.

◆ maxBlockCount

uint32_t _usdhc_capability::maxBlockCount

Maximum block count can be set one time.

◆ maxBlockLength

uint32_t _usdhc_capability::maxBlockLength

Maximum block length united as byte.

◆ mmcVersion

uint32_t _usdhc_capability::mmcVersion

Support EMMC card version.

◆ readBurstLen

uint8_t _usdhc_config::readBurstLen

Read burst len.

◆ readWatermarkLevel

uint8_t _usdhc_config::readWatermarkLevel

Watermark level for DMA read operation. Available range is 1 ~ 128.

◆ response

uint32_t _usdhc_command::response[4U]

Response for this command.

◆ responseErrorFlags

uint32_t _usdhc_command::responseErrorFlags

Response error flag, which need to check the command reponse.

◆ responseType

usdhc_card_response_type_t _usdhc_command::responseType

Command response type.

◆ ReTuning

void(* _usdhc_transfer_callback::ReTuning) (USDHC_Type *base, void *userData)

Handle the re-tuning.

◆ rxData

uint32_t* _usdhc_data::rxData

Buffer to save data read.

◆ SdioInterrupt

void(* _usdhc_transfer_callback::SdioInterrupt) (USDHC_Type *base, void *userData)

SDIO card interrupt occurs

◆ sdVersion

uint32_t _usdhc_capability::sdVersion

Support SD card/sdio version.

◆ sgData

usdhc_scatter_gather_data_list_t _usdhc_scatter_gather_data::sgData

scatter gather data

◆ sourceClock_Hz

uint32_t _usdhc_host::sourceClock_Hz

USDHC source clock frequency united in Hz.

◆ transfer

usdhc_transfer_function_t _usdhc_host::transfer

USDHC transfer function.

◆ TransferComplete

void(* _usdhc_transfer_callback::TransferComplete) (USDHC_Type *base, usdhc_handle_t *handle, status_t status, void *userData)

Transfer complete callback.

◆ transferredWords

volatile uint32_t _usdhc_handle::transferredWords

Transfer status. Words transferred by DATAPORT way.

◆ txData

const uint32_t* _usdhc_data::txData

Data buffer to write.

◆ type

usdhc_card_command_type_t _usdhc_command::type

Command type.

◆ userData

void* _usdhc_handle::userData

Parameter for transfer complete callback.

◆ writeBurstLen

uint8_t _usdhc_config::writeBurstLen

Write burst len.

◆ writeWatermarkLevel

uint8_t _usdhc_config::writeWatermarkLevel

Watermark level for DMA write operation. Available range is 1 ~ 128.