|
AM263Px MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
68 #include <drivers/mmcsd/v1/cslr_mmcsd.h>
81 #define MMCSD_STS_SUCCESS ((int32_t) 0)
84 #define MMCSD_STS_ERR ((int32_t)-1)
87 #define MMCSD_STS_ERR_TIMEOUT ((int32_t)-2)
89 #define MMCSD_STS_ERR_INVALID_PARAM ((int32_t)-3)
91 #define MMCSD_STS_ERR_BUSY ((int32_t)-4)
93 #define MMCSD_STS_ERR_CARD_NOT_FOUND ((int32_t)-5)
95 #define MMCSD_STS_ERR_CARD_UNUSEABLE ((int32_t)-6)
97 #define MMCSD_STS_ERR_CARD_UNLOCK_FAIL ((int32_t)-7)
109 #define MMCSD_NO_WAIT ((uint32_t)0)
112 #define MMCSD_WAIT_FOREVER ((uint32_t)-1)
124 #define MMCSD_STATE_RESET ((uint8_t) 0U)
127 #define MMCSD_STATE_IDLE ((uint8_t) 1U)
130 #define MMCSD_STATE_BUSY ((uint8_t) 2U)
133 #define MMCSD_STATE_ERROR ((uint8_t) 3U)
144 #define MMCSD_XFER_IDLE_STATE ((uint8_t) 0U)
146 #define MMCSD_XFER_CMD_STATE ((uint8_t) 1U)
148 #define MMCSD_XFER_WRITE_STATE ((uint8_t) 2U)
150 #define MMCSD_XFER_READ_STATE ((uint8_t) 3U)
161 #define MMCSD_CARD_TYPE_SD ((uint32_t) 0U)
163 #define MMCSD_CARD_TYPE_EMMC ((uint32_t) 2U)
165 #define MMCSD_CARD_TYPE_NO_DEVICE ((uint32_t) 3U)
176 #define MMCSD_BUS_WIDTH_1BIT ((uint32_t) 1U)
178 #define MMCSD_BUS_WIDTH_4BIT ((uint32_t) 4U)
180 #define MMCSD_BUS_WIDTH_8BIT ((uint32_t) 8U)
191 #define MMCSD_SD_MODE_DS ((uint32_t) 10U)
193 #define MMCSD_SD_MODE_HS ((uint32_t) 11U)
316 uint32_t response[4];
425 uint32_t startBlk, uint32_t numBlks);
438 uint32_t startBlk, uint32_t numBlks);
451 uint32_t startBlk, uint32_t numBlks);
464 uint32_t startBlk, uint32_t numBlks);
uint32_t setBusSpeed
Definition: mmcsd_lld.h:376
uint8_t * dataBufIdx
Definition: mmcsd_lld.h:363
int32_t MMCSD_lld_read_SD_Poll(MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block reads from the SD media in Polling Mode.
uint32_t intrNum
Definition: mmcsd_lld.h:330
void * args
Definition: hsmclient_msg.h:4
uint32_t ocr
Definition: mmcsd_lld.h:266
bool autoAssignMaxSpeed
Definition: mmcsd_lld.h:334
uint8_t manuID
Definition: mmcsd_lld.h:276
MMCSD_lld_transferCompleteCallback transferCompleteCallback
Definition: mmcsd_lld.h:388
uint8_t transferSpeed
Definition: mmcsd_lld.h:284
uint8_t * dataBuf
Definition: mmcsd_lld.h:346
uint32_t blockCount
Definition: mmcsd_lld.h:246
bool enableDma
Definition: mmcsd_lld.h:340
SD device properties.
Definition: mmcsd_lld.h:263
uint32_t baseAddr
Definition: mmcsd_lld.h:326
uint32_t rca
Definition: mmcsd_lld.h:232
uint8_t state
Definition: mmcsd_lld.h:382
void MMCSD_lld_Isr(void *args)
This is the MMCSD Controller ISR and can be used as IRQ handler.
uint8_t specVersion
Definition: mmcsd_lld.h:280
uint32_t setBusWidth
Definition: mmcsd_lld.h:378
MMCSD LLD Transaction.
Definition: mmcsd_lld.h:301
uint32_t arg
Definition: mmcsd_lld.h:308
uint16_t xferErrorStat
Definition: mmcsd_lld.h:361
uint16_t maxReadBlockLen
Definition: mmcsd_lld.h:270
bool isHC
Definition: mmcsd_lld.h:290
int32_t MMCSD_lld_deInit(MMCSDLLD_Handle handle)
This API De-Initializes the MMCSD instance.
int32_t MMCSD_lld_write_SD_Intr(MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block writes to the SD media in Interrupt Mode.
MMCSDLLD_Transaction * currentTxn
Definition: mmcsd_lld.h:371
MMCSD Driver Initialization Object.
Definition: mmcsd_lld.h:323
uint8_t eStrobeSupport
Definition: mmcsd_lld.h:252
uint8_t manuID
Definition: mmcsd_lld.h:240
uint32_t isCmd23
Definition: mmcsd_lld.h:286
uint8_t specVersion
Definition: mmcsd_lld.h:244
uint32_t ocr
Definition: mmcsd_lld.h:230
uint32_t cardType
Definition: mmcsd_lld.h:332
MMCSD Driver Object.
Definition: mmcsd_lld.h:356
uint32_t blockCount
Definition: mmcsd_lld.h:314
struct MMCSDLLD_InitObject * MMCSDLLD_InitHandle
uint8_t * dataBuf
Definition: mmcsd_lld.h:310
int32_t MMCSD_lld_read_SD_Intr(MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block reads from the SD media in Interrupt Mode.
uint32_t rca
Definition: mmcsd_lld.h:268
uint32_t remainingBlockCount
Definition: mmcsd_lld.h:369
uint8_t supportedModes
Definition: mmcsd_lld.h:250
uint32_t blockSize
Definition: mmcsd_lld.h:312
int32_t MMCSD_lld_write_SD_Poll(MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
Function to perform block writes to the SD media in Polling Mode.
uint32_t dataBlockCount
Definition: mmcsd_lld.h:365
int32_t MMCSD_lld_init(MMCSDLLD_Handle handle)
This API Initializes the MMCSD instance.
eMMC device properties
Definition: mmcsd_lld.h:227
uint16_t maxReadBlockLen
Definition: mmcsd_lld.h:234
uint32_t busWidth
Definition: mmcsd_lld.h:338
struct MMCSDLLD_Object * MMCSDLLD_Handle
uint8_t transferSpeed
Definition: mmcsd_lld.h:248
uint32_t supportedDataWidths
Definition: mmcsd_lld.h:288
MMCSDLLD_Transaction mmcsdTxn
Definition: mmcsd_lld.h:373
uint16_t maxWriteBlockLen
Definition: mmcsd_lld.h:236
uint32_t MMCSD_lld_getBlockSize(MMCSDLLD_Handle handle)
This function returns the block size of the MMC/SD media connected to the MMCSD controller.
void * deviceData
Definition: mmcsd_lld.h:342
bool isHC
Definition: mmcsd_lld.h:256
uint32_t dataBlockSize
Definition: mmcsd_lld.h:367
uint32_t blockCount
Definition: mmcsd_lld.h:282
MMCSDLLD_InitHandle initHandle
Definition: mmcsd_lld.h:384
uint32_t cmd
Definition: mmcsd_lld.h:304
void(* MMCSD_lld_transferCompleteCallback)(void *args, int32_t xferStatus)
The definition of a transfer completion callback function used by the MMCSD driver when used in Callb...
Definition: mmcsd_lld.h:217
uint32_t inputClkFreq
Definition: mmcsd_lld.h:328
void * args
Definition: mmcsd_lld.h:386
uint8_t xferState
Definition: mmcsd_lld.h:380
MMCSD_Clock_uSleep Clock_uSleep
Definition: mmcsd_lld.h:349
uint16_t cmdErrorStat
Definition: mmcsd_lld.h:359
uint8_t driveStrength
Definition: mmcsd_lld.h:254
uint32_t flags
Definition: mmcsd_lld.h:306
void(* MMCSD_Clock_uSleep)(uint32_t usec)
The definition of a sleep function used by the MMCSD driver for delay.
Definition: mmcsd_lld.h:208
uint32_t uaBusSpeed
Definition: mmcsd_lld.h:336
uint16_t maxWriteBlockLen
Definition: mmcsd_lld.h:272