86#define IOT_SDIO_SUCCESS ( 0 )
89#define IOT_SDIO_IOCTL_FAIL ( 1 )
92#define IOT_SDIO_HOST_INIT_FAIL ( 2 )
95#define IOT_SDIO_INVALID_VALUE ( 3 )
98#define IOT_SDIO_TRANSFER_FAIL ( 4 )
105#define IOT_SDIO_SWITCH_HIGH_SPEED_FAIL ( 5 )
112#define IOT_SDIO_LOW_SPEED_CARD ( 6 )
118#define IOT_SDIO_SELECT_BUS_TIMING_FAIL ( 7 )
121#define IOT_SDIO_SET_CARD_BLOCK_SIZE_FAIL ( 8 )
128#define IOT_SDIO_SWITCH_VOLTAGE_FAIL ( 9 )
131#define IOT_SDIO_HOST_NOT_READY ( 10 )
134#define IOT_SDIO_INVALID_CARD ( 11 )
137#define IOT_SDIO_SEND_RELATIVE_ADDRESS_FAIL ( 12 )
140#define IOT_SDIO_SELECT_CARD_FAIL ( 13 )
144#define IOT_SDIO_READ_CIS_FAIL ( 14 )
147#define IOT_SDIO_SET_DATA_BUS_WIDTH_FAIL ( 15 )
150#define IOT_SDIO_ASYNC_INT_NOT_SUPPORTED ( 16 )
153#define IOT_SDIO_GET_CARD_CAPABILITY_FAIL ( 17 )
156#define IOT_SDIO_FUNCTION_NOT_SUPPORTED ( 18 )
162#define IOT_SDIO_BUS_1BIT ( 0 )
165#define IOT_SDIO_BUS_4BIT ( 2 )
167#define IOT_SDIO_BUS_8BIT ( 3 )
172typedef enum IotSdioDirection
193typedef enum IotSdioFunction
209typedef enum IotSdioCardDetectType
221typedef enum IotSdioEventType
233typedef enum IotSdioIoctlRequest
277typedef enum IotSdioBusWidth
287typedef struct IoTSdioCardDetectParam
297typedef struct IoTSdioPowerOnOffCard
306typedef struct IotSdioFuncBlkSize
317typedef struct IotSdioPerFuncEnable
326typedef struct IotSdioReadCis
337typedef enum IotSdioSdDriverStrength
348struct IotSdioSlotDescriptor;
370 void * pvUserContext );
398 void * pvUserContext );
671 void * pvIOFunctionCallbackUserContext );
687 void * pvSdioCallbackUserContext );
712 void *
const pvBuffer );
IotSdioSdDriverStrength_t
SDIO card driver strength, input parameter type for eSDIOSetDriverStrength ioctl request.
Definition: iot_sdio.h:338
int32_t iot_sdio_card_connect(IotSdioSlotHandle_t const pxSdioHandle)
iot_sdio_card_connect() is used to connect SDIO card.
#define IOT_SDIO_BUS_1BIT
sdio io bus width
Definition: iot_sdio.h:162
#define IOT_SDIO_BUS_4BIT
Definition: iot_sdio.h:165
IotSdioIoctlRequest_t
IOCTL request types.
Definition: iot_sdio.h:234
void(* IotSdioIOFunctionCallback_t)(IotSdioSlotHandle_t const pxSdioHandle, IotSdioFunction_t eFunc, void *pvUserContext)
SDIO I/O function callback type. User can call iot_sdio_set_io_function_callback() API to set one IOF...
Definition: iot_sdio.h:396
int32_t iot_sdio_card_reset(IotSdioSlotHandle_t const pxSdioHandle)
iot_sdio_card_reset() is used to reset the sdio card in the target slot. This API should soft reset a...
IotSdioCardDetectType_t
card detect type
Definition: iot_sdio.h:210
IotSdioFunction_t
SDIO I/O function number type Each SDIO card can support up to 7 I/O functions. Each I/O function can...
Definition: iot_sdio.h:194
int32_t iot_sdio_io_write_extended(IotSdioSlotHandle_t const pxSdioHandle, IotSdioFunction_t eFunc, bool bBlockMode, bool bOpcode, uint32_t ulRegAddr, uint8_t *pucBuf, uint32_t ulCount)
iot_sdio_io_write_extended() implements the write portion of CMD53. It is used to write multiple byte...
int32_t iot_sdio_card_disconnect(IotSdioSlotHandle_t const pxSdioHandle)
iot_sdio_card_disconnect() is used to disconnect SDIO card.
int32_t iot_sdio_io_read_direct(IotSdioSlotHandle_t const pxSdioHandle, IotSdioFunction_t eFunc, uint32_t ulRegAddr, uint8_t *pucData)
iot_sdio_io_read_direct() implements the read portion of CMD52. It is used to read 1 byte from a sing...
int32_t iot_sdio_set_io_function_callback(IotSdioSlotHandle_t const pxSdioHandle, IotSdioFunction_t eFunc, IotSdioIOFunctionCallback_t xIOFunctionCallback, void *pvIOFunctionCallbackUserContext)
iot_sdio_set_io_function_callback() is used to set IOFunctionCallback for each I/O function the card ...
IotSdioEventType_t
common notify event types in sdio callback
Definition: iot_sdio.h:222
int32_t iot_sdio_ioctl(IotSdioSlotHandle_t const pxSdioHandle, IotSdioIoctlRequest_t xSdioIoctlRequest, void *const pvBuffer)
iot_sdio_ioctl() is Used for various sdio control function.
int32_t iot_sdio_set_sdio_callback(IotSdioSlotHandle_t const pxSdioHandle, IotSdioCallback_t xSdioCallback, void *pvSdioCallbackUserContext)
iot_sdio_set_sdio_callback() is used to set sdio card interrupt callback.
#define IOT_SDIO_BUS_8BIT
Definition: iot_sdio.h:167
IotSdioBusWidth_t
sdio bus width, input parameter type for eSDIOSetDataBusWidth ioctl request
Definition: iot_sdio.h:278
IotSdioDirection_t
sdio io read/write direction
Definition: iot_sdio.h:173
void(* IotSdioCallback_t)(IotSdioSlotHandle_t const pxSdioHandle, IotSdioEventType_t eSdioEvent, void *pvUserContext)
The callback function for sdio event operation. This callback is passed to driver by using iot_sdio_s...
Definition: iot_sdio.h:368
int32_t iot_sdio_io_read_extended(IotSdioSlotHandle_t const pxSdioHandle, IotSdioFunction_t eFunc, bool bBlockMode, bool bOpcode, uint32_t ulRegAddr, uint8_t *pucBuf, uint32_t ulCount)
iot_sdio_io_read_extended() implements the read portion of CMD53. It is used to read multiple bytes o...
int32_t iot_sdio_io_write_direct(IotSdioSlotHandle_t const pxSdioHandle, IotSdioFunction_t eFunc, uint32_t ulRegAddr, uint8_t *pucData, bool bRaw)
iot_sdio_io_write_direct() implements the write portion of CMD52. It is used to write 1 byte to a sin...
IotSdioSlotHandle_t iot_sdio_open(uint8_t ucHostIdx, uint8_t ucSlotIdx)
iot_sdio_open() is used to open a handle to a sdio card slot.
int32_t iot_sdio_close(IotSdioSlotHandle_t const pxSdioHandle)
iot_sdio_close() is used to close the sdio card slot handle. IO operation initiated through this hand...
struct IotSdioSlotDescriptor * IotSdioSlotHandle_t
IotSdioSlotHandle_t type is the SDIO slot handle returned by calling iot_sdio_open()
Definition: iot_sdio.h:353
@ eSdDriverStrengthTypeB
Definition: iot_sdio.h:339
@ eSdDriverStrengthTypeC
Definition: iot_sdio.h:341
@ eSdDriverStrengthTypeD
Definition: iot_sdio.h:342
@ eSdDriverStrengthTypeA
Definition: iot_sdio.h:340
@ eSDIOSetDriverStrength
Definition: iot_sdio.h:235
@ eSDIOCheckCardPresence
Definition: iot_sdio.h:270
@ eSDIOSwitchToHighSpeed
Definition: iot_sdio.h:239
@ eSDIOSetCardDetectParams
Definition: iot_sdio.h:244
@ eSDIOEnableAsyncIrqMode
Definition: iot_sdio.h:253
@ eSDIOPowerOnOffCard
Definition: iot_sdio.h:265
@ eSDIOEnableIOFunctionIrq
Definition: iot_sdio.h:250
@ eSDIOEnableIo
Definition: iot_sdio.h:255
@ eSDIOReadCis
Definition: iot_sdio.h:262
@ eSDIOSetFuncBlockSize
Definition: iot_sdio.h:247
@ eSDIOGetCardCapabilities
Definition: iot_sdio.h:242
@ eSDIOSetCardInactive
Definition: iot_sdio.h:238
@ eSDIOSetDataBusWidth
Definition: iot_sdio.h:240
@ eSDIOSelectIo
Definition: iot_sdio.h:258
@ eSDIOAbortIo
Definition: iot_sdio.h:260
@ eDetectCardByHostDATA3
Definition: iot_sdio.h:213
@ eDetectCardByGpioCD
Definition: iot_sdio.h:211
@ eDetectCardByHostCD
Definition: iot_sdio.h:212
@ eDetectCardNonStandard
Definition: iot_sdio.h:214
@ eSdioFunction1
Definition: iot_sdio.h:196
@ eSdioFunction4
Definition: iot_sdio.h:199
@ eSdioFunction7
Definition: iot_sdio.h:202
@ eSdioFunction2
Definition: iot_sdio.h:197
@ eSdioFunction6
Definition: iot_sdio.h:201
@ eSdioFunctionMemory
Definition: iot_sdio.h:203
@ eSdioFunction0
Definition: iot_sdio.h:195
@ eSdioFunction5
Definition: iot_sdio.h:200
@ eSdioFunction3
Definition: iot_sdio.h:198
@ eSdioCardPowerOnEvent
Definition: iot_sdio.h:226
@ eSdioCardRemovedEvent
Definition: iot_sdio.h:225
@ eSdioCardPowerOffEvent
Definition: iot_sdio.h:227
@ eSdioCardInterruptEvent
Definition: iot_sdio.h:223
@ eSdioCardInsertedEvent
Definition: iot_sdio.h:224
@ eDataBus4Bit
Definition: iot_sdio.h:280
@ eDataBus8Bit
Definition: iot_sdio.h:281
@ eDataBus1Bit
Definition: iot_sdio.h:279
@ eIORead
Definition: iot_sdio.h:174
@ eIOWrite
Definition: iot_sdio.h:175
input parameter type for eSDIOPowerOnOffCard ioctl request
Definition: iot_sdio.h:298
bool bPowerOn
Definition: iot_sdio.h:299
bool bUseCallback
Definition: iot_sdio.h:300
input parameter type for eSDIOSetCardDetectParams ioctl request
Definition: iot_sdio.h:288
IotSdioCardDetectType_t eCardDetectType
Definition: iot_sdio.h:289
bool bCallbackOnInsert
Definition: iot_sdio.h:290
bool bCallbackOnRemoval
Definition: iot_sdio.h:291
input parameter type for eSDIOSetFuncBlockSize ioctl request
Definition: iot_sdio.h:307
IotSdioFunction_t eFunc
Definition: iot_sdio.h:308
uint32_t ulBlockSize
Definition: iot_sdio.h:309
input parameter type for eSDIOEnableIOFunctionIrq ioctl request and for eSDIOEnableIo ioctl request
Definition: iot_sdio.h:318
IotSdioFunction_t eFunc
Definition: iot_sdio.h:319
bool bEnable
Definition: iot_sdio.h:320
input parameter type for eSDIOReadCis ioctl request
Definition: iot_sdio.h:327
IotSdioFunction_t eFunc
Definition: iot_sdio.h:328
uint32_t ulTupleNum
Definition: iot_sdio.h:331
const uint32_t * pulTupleList
Definition: iot_sdio.h:329