int32_t (*func0ReadBytes)(struct SdioDevice *dev, uint8_t *data, uint32_t addr, uint32_t size); int32_t (*func0WriteBytes)(struct SdioDevice *dev, uint8_t *data, uint32_t addr, uint32_t size); int32_t (*setBlockSize)(struct SdioDevice *dev, uint32_t blockSize); int32...
int32_t SdioSetBlockSize (DevHandle handle, uint32_t blockSize ) Description: Sets the block size. If data to read or write is performed, use this function to set the block size. Parameters: Name Description handle Indicates the pointer to the device handle of the SDIO controller obtain...
SdioSetBlockSize (DevHandle handle, uint32_t blockSize) int32_t Sets the block size. SdioGetCommonInfo (DevHandle handle, SdioCommonInfo *info, SdioCommonInfoType infoType) int32_t Obtains common information. SdioSetCommonInfo (DevHandle handle, SdioCommonInfo *info, SdioCommonInfoType in...
SD_WriteBlock 写入函数的执行流程如下: SD_WriteBlock 函数开始时将 SDIO 数据控制寄存器 (SDIO_DCTRL)清零,复位之前的传输设置。 对SD 卡进行数据读写之前,都必须发送 CMD16 指定块的大小,对于标准卡,要写入BlockSize 长度字节的块;对于 SDHC 卡,写入固定为 512 字节的块。接下来就可以发送块写入命令 CMD24 ...
SDIO_CMDINITSTRUCTURE.SDIO_ARGUMENT = (UINT32_T) BLOCKSIZE; SDIO_CMDINITSTRUCTURE.SDIO_CMDINDEX = SD_CMD_SET_BLOCKLEN; SDIO_CMDINITSTRUCTURE.SDIO_RESPONSE = SDIO_RESPONSE_SHORT; SDIO_CMDINITSTRUCTURE.SDIO_WAIT = SDIO_WAIT_NO; SDIO_CMDINITSTRUCTURE.SDIO_CPSM = SDIO_CPSM_ENABLE; ...
它设定SDIO数据控制寄存器(SDIO_DCTRL)寄存器的DBLOCKSIZE位的值。(4) SDIO_TransferDir:数据传输方向,可选从主机到卡的写操作,或从卡到主机的读操作。它设定SDIO_DCTRL寄存器的DTDIR位的值。(5) SDIO_TransferMode:数据传输模式,可选数据块或数据流模式。对于SD卡操作使用数据块类型。它设定SDIO_DCTRL寄存器的...
/* Set Block Size for Card,cmd16, * 若是sdsc卡,可以用来设置块大小, * 若是sdhc卡,块大小为512字节,不受cmd16影响 */ /*!< Send CMD 16 */ SDIO_CmdInitStructure.SDIO_Argument = (uint32_t) BlockSize; SDIO_CmdInitStructure.SDIO_CmdIndex = SD_CMD_SET_BLOCKLEN; ...
3) SDIO_DataBlockSize:设置数据块大小,有多种尺寸可选,不同命令要求的数据块可能不同。 4) SDIO_TransferDir:数据传输方向,可选从主机到卡的写操作,或从卡到主机的读操作。 5) SDIO_TransferMode:数据传输模式,可选数据块或数据流模式。对于 SD 卡操作使用数据块类型。
sdio_wait_type_set(SDIO_WAITTYPE_NO); sdio_csm_enable(); /* check if some error occurs */ status = r1_error_check(SD_CMD_WRITE_BLOCK); if(SD_OK != status){ return status; }stopcondition = 0; totalnumber_bytes = blocksize;/* configure the SDIO data transmission */ sdio_data_co...
/* send CMD16(SET_BLOCKLEN) to set the block length */ sdio_command_response_config(SD_CMD_SET_BLOCKLEN, (uint32_t)blocksize, SDIO_RESPONSETYPE_SHORT); sdio_wait_type_set(SDIO_WAITTYPE_NO); sdio_csm_enable(); /* check if some error occurs */ ...