SD Exported Functions

group SD_Exported_Functions

Functions

SdEmmcRes_t SdEmmc_Init(SDHC_TypeDef *SDHCx, const SdEmmcInitParm_t *pParm)

SDCard or EMMC init flow.

参数:
  • SDHCx -- [in] Specifies the SDHC peripheral.

  • pParm -- [in] Specifies the parameters for CardType, DataWidth, ClkOutFreq_kHz. Please refer to SD/EMMC Init Parameters for more details.

返回:

Please refer to SD/EMMC Return Value for more details.

SdEmmcRes_t SdEmmc_Read(SDHC_TypeDef *SDHCx, uint32_t StartBlock, uint32_t BlockCnt, void *pBuf)

SDCard or EMMC read data.

参数:
  • SDHCx -- [in] Specifies the SDHC peripheral.

  • StartBlock -- [in] Start block.

  • BlockCnt -- [in] Block count.

  • pBuf -- [out] Pointer to a read buffer.

返回:

Please refer to SD/EMMC Return Value for more details.

SdEmmcRes_t SdEmmc_Write(SDHC_TypeDef *SDHCx, uint32_t StartBlock, uint32_t BlockCnt, const void *pBuf)

SDCard or EMMC write data.

参数:
  • SDHCx -- [in] Specifies the SDHC peripheral.

  • StartBlock -- [in] Start block.

  • BlockCnt -- [in] Block count.

  • pBuf -- [in] Pointer to a write buffer.

返回:

Please refer to SD/EMMC Return Value for more details.

uint32_t SdEmmc_GetBlockCnt(SDHC_TypeDef *SDHCx)

SDCard or EMMC get block count.

参数:

SDHCx -- [in] Specifies the SDHC peripheral.

返回:

Block count for transfer.