AM263Px MCU+ SDK  11.00.00

Introduction

This module contains APIs to program and use the MMCSD LLD modules. The APIs can be used by other drivers to get access to MMCSD and also by application to initiate transaction operations.

The MMCSD LLD header file should be included in an application as follows:

#include <drivers/MMCSD/v1/lld/mmcsd_lld.h>

Files

file  mmcsd_lld.h
 MMCSD LLD Driver API/interface file.
 

Data Structures

struct  MMCSD_EmmcDeviceData
 eMMC device properties More...
 
struct  MMCSD_SdDeviceData
 SD device properties. More...
 
struct  MMCSDLLD_Transaction
 MMCSD LLD Transaction. More...
 
struct  MMCSDLLD_InitObject
 MMCSD Driver Initialization Object. More...
 
struct  MMCSDLLD_Object
 MMCSD Driver Object. More...
 

Functions

int32_t MMCSD_lld_init (MMCSDLLD_Handle handle)
 This API Initializes the MMCSD instance. More...
 
int32_t MMCSD_lld_InitDma (MMCSDLLD_Handle handle)
 This API Initializes the MMCSD instance for DMA transfers. More...
 
int32_t MMCSD_lld_deInit (MMCSDLLD_Handle handle)
 This API De-Initializes the MMCSD instance. More...
 
int32_t MMCSD_lld_deInitDma (MMCSDLLD_Handle handle)
 This API De-Initializes the MMCSD instance with DMA transfers. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int32_t MMCSD_lld_write_SD_Dma (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Function to perform block writes to the SD media in DMA Mode. More...
 
int32_t MMCSD_lld_read_SD_Dma (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Function to perform block reads from the SD media in DMA Mode. More...
 
int32_t MMCSD_lld_write_MMC_Poll (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Writes data to the MMC card using polling method. More...
 
int32_t MMCSD_lld_read_MMC_Poll (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Reads data from the MMC card using polling method. More...
 
int32_t MMCSD_lld_write_MMC_Intr (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Writes data to the MMC card using interrupt method. More...
 
int32_t MMCSD_lld_read_MMC_Intr (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Reads data from the MMC card using interrupt method. More...
 
int32_t MMCSD_lld_write_MMC_Dma (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Function to perform block writes to the MMC media in DMA Mode. More...
 
int32_t MMCSD_lld_read_MMC_Dma (MMCSDLLD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Function to perform block reads from the MMC media in DMA Mode. More...
 
uint32_t MMCSD_lld_getBlockSize (MMCSDLLD_Handle handle)
 This function returns the block size of the MMC/SD media connected to the MMCSD controller. More...
 
void MMCSD_lld_completeCurrTransfer (MMCSDLLD_Handle handle, int32_t xferStatus)
 Completes the current MMC/SD data transfer operation. More...
 
void MMCSD_lld_Isr (void *args)
 This is the MMCSD Controller ISR and can be used as IRQ handler. More...
 

Typedefs

typedef 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 Callback Mode. More...
 
typedef struct MMCSDLLD_InitObjectMMCSDLLD_InitHandle
 
typedef struct MMCSDLLD_ObjectMMCSDLLD_Handle
 

Return status

typedef EDMA_Handle MMCSD_DmaHandle
 
typedef struct MMCSD_EdmaChConfig_s * MMCSD_DmaChConfig
 
#define MMCSD_STS_SUCCESS   ((int32_t) 0)
 Return status when the API execution was successful. More...
 
#define MMCSD_STS_ERR   ((int32_t)-1)
 Return status when the API execution was not successful due to a generic Error. More...
 
#define MMCSD_STS_ERR_TIMEOUT   ((int32_t)-2)
 Return status when the API execution was not successful due to a time out. More...
 
#define MMCSD_STS_ERR_INVALID_PARAM   ((int32_t)-3)
 Return status when the API execution failed due invalid parameters. More...
 
#define MMCSD_STS_ERR_BUSY   ((int32_t)-4)
 Return status when the API execution failed due to driver busy. More...
 
#define MMCSD_STS_ERR_CARD_NOT_FOUND   ((int32_t)-5)
 Return status when the API execution failed due to missing card. More...
 
#define MMCSD_STS_ERR_CARD_UNUSEABLE   ((int32_t)-6)
 Return status when the API execution failed due to unuseable card. More...
 
#define MMCSD_STS_ERR_CARD_UNLOCK_FAIL   ((int32_t)-7)
 Return status when the API execution failed due to card Unlock Failure. More...
 

Timeout values

#define MMCSD_NO_WAIT   ((uint32_t)0)
 Value to use when needing a timeout of zero or NO timeout, return immediately on resource not available. More...
 
#define MMCSD_WAIT_FOREVER   ((uint32_t)-1)
 Value to use when needing a timeout of infinity or wait forever until resource is available. More...
 

MMCSD Driver states

#define MMCSD_STATE_RESET   ((uint8_t) 0U)
 MMCSD driver is in Reset State prior to driver init and post driver deinit. More...
 
#define MMCSD_STATE_IDLE   ((uint8_t) 1U)
 MMCSD driver accepts runtime APIs only Ready State, otherwise return error. More...
 
#define MMCSD_STATE_BUSY   ((uint8_t) 2U)
 MMCSD driver is busy performing operation with peripherals, return error when APIs are invoked. More...
 
#define MMCSD_STATE_ERROR   ((uint8_t) 3U)
 MMCSD driver ran into error, returns error for all APIs other than deinit in this state. More...
 

MMCSD Transfer states

#define MMCSD_XFER_IDLE_STATE   ((uint8_t) 0U)
 XFER is in IDLE state. More...
 
#define MMCSD_XFER_CMD_STATE   ((uint8_t) 1U)
 XFER is in CMD state. More...
 
#define MMCSD_XFER_WRITE_STATE   ((uint8_t) 2U)
 XFER is in Write state. More...
 
#define MMCSD_XFER_READ_STATE   ((uint8_t) 3U)
 XFER is in Read state. More...
 

MACROS used to select one of the possible Card Types.

#define MMCSD_CARD_TYPE_SD   ((uint32_t) 0U)
 Card type SD. More...
 
#define MMCSD_CARD_TYPE_EMMC   ((uint32_t) 2U)
 Card type MMC. More...
 
#define MMCSD_CARD_TYPE_NO_DEVICE   ((uint32_t) 3U)
 No Card Installed. More...
 

MACROS for the possible values of Bus Width configuration.

#define MMCSD_BUS_WIDTH_1BIT   ((uint32_t) 1U)
 Card bus width configuration for 1-bit mode. More...
 
#define MMCSD_BUS_WIDTH_4BIT   ((uint32_t) 4U)
 Card bus width configuration for 4-bit mode. More...
 
#define MMCSD_BUS_WIDTH_8BIT   ((uint32_t) 8U)
 Card bus width configuration for 8-bit mode. More...
 

ECSD Bus Width Macros

Macros for Extended CSD (ECSD) bus width configuration in eMMC devices. These macros are used to set or interpret the bus width field in the ECSD register.

#define MMCSD_ECSD_BUS_WIDTH_INDEX   (183U)
 ECSD register index for bus width configuration. More...
 
#define MMCSD_ECSD_BUS_WIDTH_1BIT   (0U)
 ECSD value for 1-bit bus width. More...
 
#define MMCSD_ECSD_BUS_WIDTH_4BIT   (1U)
 ECSD value for 4-bit bus width. More...
 
#define MMCSD_ECSD_BUS_WIDTH_8BIT   (2U)
 ECSD value for 8-bit bus width. More...
 
#define MMCSD_ECSD_BUS_WIDTH_4BIT_DDR   (5U)
 ECSD value for 4-bit DDR bus width. More...
 
#define MMCSD_ECSD_BUS_WIDTH_8BIT_DDR   (6U)
 ECSD value for 8-bit DDR bus width. More...
 
#define MMCSD_ECSD_BUS_WIDTH_BUSWIDTH_MASK   (0x0FU)
 Mask for extracting bus width bits from ECSD value. More...
 
#define MMCSD_ECSD_BUS_WIDTH_BUSWIDTH_SHIFT   (0U)
 Bit shift for bus width bits in ECSD value. More...
 
#define MMCSD_ECSD_BUS_WIDTH_ES_ENABLE   (0x80U)
 Enable Enhanced Strobe in ECSD bus width field. More...
 
#define MMCSD_ECSD_BUS_WIDTH_ES_MASK   (0x80U)
 Mask for Enhanced Strobe bit in ECSD bus width field. More...
 
#define MMCSD_ECSD_BUS_WIDTH_ES_SHIFT   (7U)
 Bit shift for Enhanced Strobe bit in ECSD bus width field. More...
 

MACROS used to select one of the possible Speed Modes for SD Device.

#define MMCSD_SD_MODE_DS   ((uint32_t) 10U)
 Default Speed. More...
 
#define MMCSD_SD_MODE_HS   ((uint32_t) 11U)
 High Speed. More...
 

Macro Definition Documentation

◆ MMCSD_STS_SUCCESS

#define MMCSD_STS_SUCCESS   ((int32_t) 0)

Return status when the API execution was successful.

◆ MMCSD_STS_ERR

#define MMCSD_STS_ERR   ((int32_t)-1)

Return status when the API execution was not successful due to a generic Error.

◆ MMCSD_STS_ERR_TIMEOUT

#define MMCSD_STS_ERR_TIMEOUT   ((int32_t)-2)

Return status when the API execution was not successful due to a time out.

◆ MMCSD_STS_ERR_INVALID_PARAM

#define MMCSD_STS_ERR_INVALID_PARAM   ((int32_t)-3)

Return status when the API execution failed due invalid parameters.

◆ MMCSD_STS_ERR_BUSY

#define MMCSD_STS_ERR_BUSY   ((int32_t)-4)

Return status when the API execution failed due to driver busy.

◆ MMCSD_STS_ERR_CARD_NOT_FOUND

#define MMCSD_STS_ERR_CARD_NOT_FOUND   ((int32_t)-5)

Return status when the API execution failed due to missing card.

◆ MMCSD_STS_ERR_CARD_UNUSEABLE

#define MMCSD_STS_ERR_CARD_UNUSEABLE   ((int32_t)-6)

Return status when the API execution failed due to unuseable card.

◆ MMCSD_STS_ERR_CARD_UNLOCK_FAIL

#define MMCSD_STS_ERR_CARD_UNLOCK_FAIL   ((int32_t)-7)

Return status when the API execution failed due to card Unlock Failure.

◆ MMCSD_NO_WAIT

#define MMCSD_NO_WAIT   ((uint32_t)0)

Value to use when needing a timeout of zero or NO timeout, return immediately on resource not available.

◆ MMCSD_WAIT_FOREVER

#define MMCSD_WAIT_FOREVER   ((uint32_t)-1)

Value to use when needing a timeout of infinity or wait forever until resource is available.

◆ MMCSD_STATE_RESET

#define MMCSD_STATE_RESET   ((uint8_t) 0U)

MMCSD driver is in Reset State prior to driver init and post driver deinit.

◆ MMCSD_STATE_IDLE

#define MMCSD_STATE_IDLE   ((uint8_t) 1U)

MMCSD driver accepts runtime APIs only Ready State, otherwise return error.

◆ MMCSD_STATE_BUSY

#define MMCSD_STATE_BUSY   ((uint8_t) 2U)

MMCSD driver is busy performing operation with peripherals, return error when APIs are invoked.

◆ MMCSD_STATE_ERROR

#define MMCSD_STATE_ERROR   ((uint8_t) 3U)

MMCSD driver ran into error, returns error for all APIs other than deinit in this state.

◆ MMCSD_XFER_IDLE_STATE

#define MMCSD_XFER_IDLE_STATE   ((uint8_t) 0U)

XFER is in IDLE state.

◆ MMCSD_XFER_CMD_STATE

#define MMCSD_XFER_CMD_STATE   ((uint8_t) 1U)

XFER is in CMD state.

◆ MMCSD_XFER_WRITE_STATE

#define MMCSD_XFER_WRITE_STATE   ((uint8_t) 2U)

XFER is in Write state.

◆ MMCSD_XFER_READ_STATE

#define MMCSD_XFER_READ_STATE   ((uint8_t) 3U)

XFER is in Read state.

◆ MMCSD_CARD_TYPE_SD

#define MMCSD_CARD_TYPE_SD   ((uint32_t) 0U)

Card type SD.

◆ MMCSD_CARD_TYPE_EMMC

#define MMCSD_CARD_TYPE_EMMC   ((uint32_t) 2U)

Card type MMC.

◆ MMCSD_CARD_TYPE_NO_DEVICE

#define MMCSD_CARD_TYPE_NO_DEVICE   ((uint32_t) 3U)

No Card Installed.

◆ MMCSD_BUS_WIDTH_1BIT

#define MMCSD_BUS_WIDTH_1BIT   ((uint32_t) 1U)

Card bus width configuration for 1-bit mode.

◆ MMCSD_BUS_WIDTH_4BIT

#define MMCSD_BUS_WIDTH_4BIT   ((uint32_t) 4U)

Card bus width configuration for 4-bit mode.

◆ MMCSD_BUS_WIDTH_8BIT

#define MMCSD_BUS_WIDTH_8BIT   ((uint32_t) 8U)

Card bus width configuration for 8-bit mode.

◆ MMCSD_ECSD_BUS_WIDTH_INDEX

#define MMCSD_ECSD_BUS_WIDTH_INDEX   (183U)

ECSD register index for bus width configuration.

◆ MMCSD_ECSD_BUS_WIDTH_1BIT

#define MMCSD_ECSD_BUS_WIDTH_1BIT   (0U)

ECSD value for 1-bit bus width.

◆ MMCSD_ECSD_BUS_WIDTH_4BIT

#define MMCSD_ECSD_BUS_WIDTH_4BIT   (1U)

ECSD value for 4-bit bus width.

◆ MMCSD_ECSD_BUS_WIDTH_8BIT

#define MMCSD_ECSD_BUS_WIDTH_8BIT   (2U)

ECSD value for 8-bit bus width.

◆ MMCSD_ECSD_BUS_WIDTH_4BIT_DDR

#define MMCSD_ECSD_BUS_WIDTH_4BIT_DDR   (5U)

ECSD value for 4-bit DDR bus width.

◆ MMCSD_ECSD_BUS_WIDTH_8BIT_DDR

#define MMCSD_ECSD_BUS_WIDTH_8BIT_DDR   (6U)

ECSD value for 8-bit DDR bus width.

◆ MMCSD_ECSD_BUS_WIDTH_BUSWIDTH_MASK

#define MMCSD_ECSD_BUS_WIDTH_BUSWIDTH_MASK   (0x0FU)

Mask for extracting bus width bits from ECSD value.

◆ MMCSD_ECSD_BUS_WIDTH_BUSWIDTH_SHIFT

#define MMCSD_ECSD_BUS_WIDTH_BUSWIDTH_SHIFT   (0U)

Bit shift for bus width bits in ECSD value.

◆ MMCSD_ECSD_BUS_WIDTH_ES_ENABLE

#define MMCSD_ECSD_BUS_WIDTH_ES_ENABLE   (0x80U)

Enable Enhanced Strobe in ECSD bus width field.

◆ MMCSD_ECSD_BUS_WIDTH_ES_MASK

#define MMCSD_ECSD_BUS_WIDTH_ES_MASK   (0x80U)

Mask for Enhanced Strobe bit in ECSD bus width field.

◆ MMCSD_ECSD_BUS_WIDTH_ES_SHIFT

#define MMCSD_ECSD_BUS_WIDTH_ES_SHIFT   (7U)

Bit shift for Enhanced Strobe bit in ECSD bus width field.

◆ MMCSD_SD_MODE_DS

#define MMCSD_SD_MODE_DS   ((uint32_t) 10U)

Default Speed.

◆ MMCSD_SD_MODE_HS

#define MMCSD_SD_MODE_HS   ((uint32_t) 11U)

High Speed.

Typedef Documentation

◆ MMCSD_DmaHandle

◆ MMCSD_DmaChConfig

typedef struct MMCSD_EdmaChConfig_s* MMCSD_DmaChConfig

◆ MMCSD_lld_transferCompleteCallback

typedef 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 Callback Mode.

Parameters
argsVoid Pointer
xferStatusTransfer Status

◆ MMCSDLLD_InitHandle

◆ MMCSDLLD_Handle

typedef struct MMCSDLLD_Object * MMCSDLLD_Handle

Function Documentation

◆ MMCSD_lld_init()

int32_t MMCSD_lld_init ( MMCSDLLD_Handle  handle)

This API Initializes the MMCSD instance.

Parameters
handle[IN] Handle to the MMCSD instance used.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_InitDma()

int32_t MMCSD_lld_InitDma ( MMCSDLLD_Handle  handle)

This API Initializes the MMCSD instance for DMA transfers.

Parameters
handle[IN] Handle to the MMCSD instance used.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_deInit()

int32_t MMCSD_lld_deInit ( MMCSDLLD_Handle  handle)

This API De-Initializes the MMCSD instance.

Parameters
handle[IN] Handle to the MMCSD instance used.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_deInitDma()

int32_t MMCSD_lld_deInitDma ( MMCSDLLD_Handle  handle)

This API De-Initializes the MMCSD instance with DMA transfers.

Parameters
handle[IN] Handle to the MMCSD instance used.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_write_SD_Poll()

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.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer from which data is to be written from.
startBlk[IN] Block to start Writing data from.
numBlks[IN] Number of blocks to write.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_read_SD_Poll()

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.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer to which data is to be read into.
startBlk[IN] Block to start reading data from.
numBlks[IN] Number of blocks to read.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_write_SD_Intr()

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.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer from which data is to be written from.
startBlk[IN] Block to start Writing data from.
numBlks[IN] Number of blocks to write.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_read_SD_Intr()

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.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer to which data is to be read into.
startBlk[IN] Block to start reading data from.
numBlks[IN] Number of blocks to read.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_write_SD_Dma()

int32_t MMCSD_lld_write_SD_Dma ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Function to perform block writes to the SD media in DMA Mode.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer from which data is to be written from.
startBlk[IN] Block to start Writing data from.
numBlks[IN] Number of blocks to write.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_read_SD_Dma()

int32_t MMCSD_lld_read_SD_Dma ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Function to perform block reads from the SD media in DMA Mode.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer to which data is to be read into.
startBlk[IN] Block to start reading data from.
numBlks[IN] Number of blocks to read.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_write_MMC_Poll()

int32_t MMCSD_lld_write_MMC_Poll ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Writes data to the MMC card using polling method.

This function writes data to the specified blocks on the MMC card using a polling-based approach.

Parameters
handleHandle to the MMCSD driver instance.
bufPointer to the buffer containing the data to be written.
startBlkStarting block number where the data will be written.
numBlksNumber of blocks to write.
Returns
int32_t Returns 0 on success, or an error code on failure.

◆ MMCSD_lld_read_MMC_Poll()

int32_t MMCSD_lld_read_MMC_Poll ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Reads data from the MMC card using polling method.

This function reads data from the specified blocks on the MMC card using a polling-based approach.

Parameters
handleHandle to the MMCSD driver instance.
bufPointer to the buffer where the read data will be stored.
startBlkStarting block number from where the data will be read.
numBlksNumber of blocks to read.
Returns
int32_t Returns 0 on success, or an error code on failure.

◆ MMCSD_lld_write_MMC_Intr()

int32_t MMCSD_lld_write_MMC_Intr ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Writes data to the MMC card using interrupt method.

This function writes data to the specified blocks on the MMC card using an interrupt-based approach.

Parameters
handleHandle to the MMCSD driver instance.
bufPointer to the buffer containing the data to be written.
startBlkStarting block number where the data will be written.
numBlksNumber of blocks to write.
Returns
int32_t Returns 0 on success, or an error code on failure.

◆ MMCSD_lld_read_MMC_Intr()

int32_t MMCSD_lld_read_MMC_Intr ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Reads data from the MMC card using interrupt method.

This function reads data from the specified blocks on the MMC card using an interrupt-based approach.

Parameters
handleHandle to the MMCSD driver instance.
bufPointer to the buffer where the read data will be stored.
startBlkStarting block number from where the data will be read.
numBlksNumber of blocks to read.
Returns
int32_t Returns 0 on success, or an error code on failure.

◆ MMCSD_lld_write_MMC_Dma()

int32_t MMCSD_lld_write_MMC_Dma ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Function to perform block writes to the MMC media in DMA Mode.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer from which data is to be written from.
startBlk[IN] Block to start Writing data from.
numBlks[IN] Number of blocks to write.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_read_MMC_Dma()

int32_t MMCSD_lld_read_MMC_Dma ( MMCSDLLD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Function to perform block reads from the MMC media in DMA Mode.

Parameters
handle[IN] Handle to the MMCSD instance used.
buf[IN] Pointer to buffer to which data is to be read into.
startBlk[IN] Block to start reading data from.
numBlks[IN] Number of blocks to read.
Returns
MMCSD_StatusCode

◆ MMCSD_lld_getBlockSize()

uint32_t MMCSD_lld_getBlockSize ( MMCSDLLD_Handle  handle)

This function returns the block size of the MMC/SD media connected to the MMCSD controller.

Precondition
MMCSD controller has been initialized using MMCSD_lld_init().
Parameters
handle[IN] Handle to the MMCSD instance used.
Returns
Block size of the media.
See also
MMCSD_lld_init()

◆ MMCSD_lld_completeCurrTransfer()

void MMCSD_lld_completeCurrTransfer ( MMCSDLLD_Handle  handle,
int32_t  xferStatus 
)

Completes the current MMC/SD data transfer operation.

This function should be called when a data transfer (read or write) operation is finished, either successfully or with an error. It handles any necessary cleanup and notifies the higher layers of the transfer completion status.

Parameters
handleHandle to the MMCSD LLD (Low Level Driver) instance.
xferStatusStatus of the completed transfer. Typically, a value of 0 indicates success, while a negative value indicates an error.

◆ MMCSD_lld_Isr()

void MMCSD_lld_Isr ( void *  args)

This is the MMCSD Controller ISR and can be used as IRQ handler.

Parameters
args[IN] Argument to the ISR.