AM263x MCU+ SDK  08.05.00

Introduction

This module contains APIs to program and use the MMCSD module. The APIs can be used by other drivers to get access to MMCSD and also by application to initiate data transfer operation.

Files

file  mmcsd/v1/mmcsd.h
 MMCSD Driver API/interface file.
 

Data Structures

struct  MMCSD_sysCfg
 Structure holding the hs mmcsd controller system configurations. More...
 
struct  MMCSD_cmd
 Structure for MMCSD command. More...
 
struct  MMCSD_cmdObj
 Structure holding the hs mmcsd controller command object. More...
 
struct  MMCSD_ioDelayParams
 
struct  MMCSD_Params
 
struct  MMCSD_EmmcDeviceData
 eMMC device properties More...
 
struct  MMCSD_SdDeviceData
 SD device properties. More...
 
struct  MMCSD_Transaction
 MMCSD transaction. More...
 
struct  MMCSD_Attrs
 MMCSD instance attributes - used during init time. More...
 
struct  MMCSD_Object
 MMCSD driver object. More...
 
struct  MMCSD_Config
 

Functions

void MMCSD_init (void)
 This function initializes the MMCSD module. More...
 
void MMCSD_deinit (void)
 This function de-initializes the MMCSD module. More...
 
void MMCSD_Params_init (MMCSD_Params *mmcsdParams)
 Initialize data structure with defaults. More...
 
MMCSD_Handle MMCSD_open (uint32_t index, const MMCSD_Params *openParams)
 This function opens a given MMCSD peripheral. More...
 
void MMCSD_close (MMCSD_Handle handle)
 Function to close a MMCSD peripheral specified by the MMCSD handle. More...
 
MMCSD_Handle MMCSD_getHandle (uint32_t index)
 This function returns the handle of an open MMCSD Instance from the instance index. More...
 
int32_t MMCSD_read (MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Function to perform block reads from the MMC/SD media. More...
 
int32_t MMCSD_write (MMCSD_Handle handle, uint8_t *buf, uint32_t startBlk, uint32_t numBlks)
 Function to perform block writes to the MMC/SD media. More...
 
uint32_t MMCSD_getBlockSize (MMCSD_Handle handle)
 This function returns the block size of the MMC/SD media connected to the MMCSD controller. More...
 
uint32_t MMCSD_getBlockCount (MMCSD_Handle handle)
 This function returns the block count of User Data Area of the MMC/SD media connected to the MMCSD controller. More...
 

Typedefs

typedef void * MMCSD_Handle
 
typedef int32_t(* MMCSD_iodelayFxn) (uint32_t instanceNum, MMCSD_ioDelayParams *iodelayParams)
 Return status of MMCSD. More...
 
typedef int32_t(* MMCSD_switchVoltage) (uint32_t controllerNum, MMCSD_BusVoltage voltage)
 A function pointer to set the voltage of the MMC I/O Cells and PBAIS to the desired voltage. More...
 
typedef uint32_t(* MMCSD_inputClockControl) (uint32_t instNum, uint32_t *clkFreq, MMCSD_inputClkCtrlMode_e)
 A function pointer to read/configure the input clock to the MMC controller. More...
 

Enumerations

enum  MMCSD_resetLineMask { MMCSD_RESET_LINE_MASK_DATA = CSL_MMC_SYSCTL_SRD_MASK, MMCSD_RESET_LINE_MASK_CMD = CSL_MMC_SYSCTL_SRC_MASK, MMCSD_RESET_LINE_MASK_ALL = CSL_MMC_SYSCTL_SRA_MASK }
 MMCSD instance attributes - used during init time. More...
 
enum  MMCSD_clkAct { MMCSD_CLK_ACT_ICLK_FCLK_OFF = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_NONE, MMCSD_CLK_ACT_FCLK_OFF = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_FUNC, MMCSD_CLK_ACT_ICLK_OFF = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_OCP, MMCSD_CLK_ACT_ICLK_FLCK_ON = CSL_MMC_SYSCONFIG_CLOCKACTIVITY_BOTH }
 Enumerates the clock activity configurations during wake up . More...
 
enum  MMCSD_standbyMode { MMCSD_STANDBY_MODE_FORCE = CSL_MMC_SYSCONFIG_STANDBYMODE_FORCE, MMCSD_STANDBY_MODE_NONE = CSL_MMC_SYSCONFIG_STANDBYMODE_NOIDLE, MMCSD_STANDBY_MODE_SMART = CSL_MMC_SYSCONFIG_STANDBYMODE_SMART, MMCSD_STANDBY_MODE_SMART_WAKEUP }
 Enumerates the standby modes. More...
 
enum  MMCSD_pwrCtrl { MMCSD_PWR_CTRL_ON = CSL_MMC_HCTL_SDBP_PWRON, MMCSD_PWR_CTRL_OFF = CSL_MMC_HCTL_SDBP_PWROFF }
 Enumerates macros to configure power on/off. More...
 
enum  MMCSD_suppVolt { MMCSD_SUPP_VOLT_1P8 = CSL_MMC_CAPA_VS18_MASK, MMCSD_SUPP_VOLT_3P0 = CSL_MMC_CAPA_VS30_MASK, MMCSD_SUPP_VOLT_3P3 = CSL_MMC_CAPA_VS33_MASK }
 Enumerates the list of supported bus voltages. More...
 
enum  MMCSD_cmdType { MMCSD_CMD_TYPE_OTHER = CSL_MMC_CMD_CMD_TYPE_NORMAL, MMCSD_CMD_TYPE_BUS_SUSPEND = CSL_MMC_CMD_CMD_TYPE_SUSPEND, MMCSD_CMD_TYPE_FUNC_SEL = CSL_MMC_CMD_CMD_TYPE_RESUME, MMCSD_CMD_TYPE_IO_ABORT = CSL_MMC_CMD_CMD_TYPE_ABORT }
 Enumerates the list of command types. More...
 
enum  MMCSD_rspType { MMCSD_RSP_TYPE_NONE = CSL_MMC_CMD_RSP_TYPE_NORSP, MMCSD_RSP_TYPE_LEN_136 = CSL_MMC_CMD_RSP_TYPE_LGHT36, MMCSD_RSP_TYPE_LEN_48 = CSL_MMC_CMD_RSP_TYPE_LGHT48, MMCSD_RSP_TYPE_LEN_48_BUSY = CSL_MMC_CMD_RSP_TYPE_LGHT48B }
 Enumerates the list of response types. More...
 
enum  MMCSD_xFerType { MMCSD_XFER_TYPE_TX = CSL_MMC_CMD_DDIR_WRITE, MMCSD_XFER_TYPE_RX = CSL_MMC_CMD_DDIR_READ }
 Enumerates the list of response types. More...
 
enum  MMCSD_intrMask {
  MMCSD_INTR_MASK_BADACCESS = CSL_MMC_IE_BADA_ENABLE_MASK, MMCSD_INTR_MASK_CARDERROR = CSL_MMC_IE_CERR_ENABLE_MASK, MMCSD_INTR_MASK_ADMAERROR = CSL_MMC_IE_ADMAE_ENABLE_MASK, MMCSD_INTR_MASK_ACMD12ERR = CSL_MMC_IE_ACE_ENABLE_MASK,
  MMCSD_INTR_MASK_DATABITERR = CSL_MMC_IE_DEB_ENABLE_MASK, MMCSD_INTR_MASK_DATACRCERR = CSL_MMC_IE_DCRC_ENABLE_MASK, MMCSD_INTR_MASK_DATATIMEOUT = CSL_MMC_IE_DTO_ENABLE_MASK, MMCSD_INTR_MASK_CMDINDXERR = CSL_MMC_IE_CIE_ENABLE_MASK,
  MMCSD_INTR_MASK_CMDBITERR = CSL_MMC_IE_CEB_ENABLE_MASK, MMCSD_INTR_MASK_CMDCRCERR = CSL_MMC_IE_CCRC_ENABLE_MASK, MMCSD_INTR_MASK_CMDTIMEOUT = CSL_MMC_IE_CTO_ENABLE_MASK, MMCSD_INTR_MASK_ERR = CSL_MMC_IE_NULL_MASK,
  MMCSD_INTR_MASK_CARDREM = CSL_MMC_IE_CREM_ENABLE_MASK, MMCSD_INTR_MASK_CARDINS = CSL_MMC_IE_CINS_ENABLE_MASK, MMCSD_INTR_MASK_BUFRDRDY = CSL_MMC_IE_BRR_ENABLE_MASK, MMCSD_INTR_MASK_BUFWRRDY = CSL_MMC_IE_BWR_ENABLE_MASK,
  MMCSD_INTR_MASK_TRNFCOMP = CSL_MMC_IE_TC_ENABLE_MASK, MMCSD_INTR_MASK_CMDCOMP = CSL_MMC_IE_CC_ENABLE_MASK
}
 Enumerates the controller's interrupt masks. More...
 
enum  MMCSD_idleMode { MMCSD_IDLE_MODE_FORCE = CSL_MMC_SYSCONFIG_SIDLEMODE_FORCE, MMCSD_IDLE_MODE_NONE = CSL_MMC_SYSCONFIG_SIDLEMODE_NOIDLE, MMCSD_IDLE_MODE_SMART = CSL_MMC_SYSCONFIG_SIDLEMODE_SMART }
 Enumerates the idle modes. More...
 
enum  MMCSD_busVolt { MMCSD_BUS_VOLT_1P8 = CSL_MMC_HCTL_SDVS__1V8, MMCSD_BUS_VOLT_3P0 = CSL_MMC_HCTL_SDVS__3V0, MMCSD_BUS_VOLT_3P3 = CSL_MMC_HCTL_SDVS__3V3 }
 Enumerates mmc sd controller's bus voltages. More...
 
enum  MMCSD_BusVoltage { MMCSD_BUS_VOLTAGE_1_8V = 0x1U, MMCSD_BUS_VOLTAGE_3_0V = 0x2U, MMCSD_BUS_VOLTAGE_3_3V = 0x4U }
 
enum  MMCSD_inputClkCtrlMode_e { MMCSD_INPUT_CLOCK_CTRL_GET, MMCSD_INPUT_CLOCK_CTRL_SET }
 ENUMs to read/configure the input clock to the MMC controller. More...
 

Macros

#define MMCSD_CARD_SD   (0U)
 Determines the type of card is SD. More...
 
#define MMCSD_CARD_MMC   (1U)
 Determines the type of card is MMC. More...
 
#define MMCSD_CARD_EMMC   (2U)
 Determines the type of card is MMC. More...
 
#define MMCSD_CARD_TYPE_NO_DEVICE   (3U)
 
#define MMCSD_CMD_SETBUSWIDTH   (MMCSD_CMD_RESERVED + 0U)
 Set bus width of MMCSD. More...
 
#define MMCSD_CMD_SETFREQUENCY   (MMCSD_CMD_RESERVED + 1U)
 Set bus frequency of MMCSD. More...
 
#define MMCSD_CMD_GETBUSWIDTH   (MMCSD_CMD_RESERVED + 2U)
 Get bus width of MMCSD. More...
 
#define MMCSD_CMD_GETFREQUENCY   (MMCSD_CMD_RESERVED + 3U)
 Get bus frequency of MMCSD. More...
 
#define MMCSD_CMD_GETMEDIAPARAMS   (MMCSD_CMD_RESERVED + 4U)
 Get media (SD/eMMC/MMC) parameters. More...
 
#define MMCSD_INVALID_MUXNUM   (-1)
 Invalid Mux num. More...
 
#define MMCSD_INVALID_MUX_EVENTNUM   (-1)
 Invalid Mux In/Out event num. More...
 
#define MMCSD_BUS_WIDTH_1BIT   (1U)
 Card bus width configuration for 1-bit mode. More...
 
#define MMCSD_BUS_WIDTH_4BIT   (4U)
 Card bus width configuration for 4-bit mode. More...
 
#define MMCSD_BUS_WIDTH_8BIT   (8U)
 Card bus width configuration for 8-bit mode. More...
 
#define MMCSD_TRANSPEED_25MBPS   (0x32U)
 Card bus frequency configuration for 25 Mbps. More...
 
#define MMCSD_TRANSPEED_50MBPS   (0x5AU)
 Card bus frequency configuration for 50 Mbps. More...
 
#define MMCSD_TRANSPEED_DEFAULT   (0x32U)
 Card bus frequency configuration for 25 Mbps. More...
 
#define MMCSD_TRANSPEED_HS   (0x5AU)
 Card bus frequency configuration for 50 Mbps. More...
 
#define MMCSD_TRANSPEED_SDR12   (0x32U)
 Card bus frequency configuration for 25 Mbps. More...
 
#define MMCSD_TRANSPEED_SDR25   (0x5AU)
 Card bus frequency configuration for 50 Mbps. More...
 
#define MMCSD_TRANSPEED_SDR50   (0xBU)
 Card bus frequency configuration for 100 Mbps. More...
 
#define MMCSD_TRANSPEED_SDR104   (0x2BU)
 Card bus frequency configuration for 200 Mbps. More...
 
#define MMCSD_TRANSPEED_DDR50   (0x3BU)
 Card bus frequency configuration for 100 Mbps. More...
 
#define MMCSD_TRANSPEED_HS200   (0x2BU)
 Card bus frequency configuration for 200 Mbps. More...
 
#define MMCSD_LOOPBACK_ANY   (0x0U)
 MMC any loop back. More...
 
#define MMCSD_LOOPBACK_INTERNAL   (0x1U)
 MMC internal loop back. More...
 
#define MMCSD_LOOPBACK_PAD   (0x2U)
 MMC pad loop back. More...
 
#define MMCSD_VOLTAGE_ANY   (0x0U)
 MMC any operating voltage. More...
 

Macro Definition Documentation

◆ MMCSD_CARD_SD

#define MMCSD_CARD_SD   (0U)

Determines the type of card is SD.

◆ MMCSD_CARD_MMC

#define MMCSD_CARD_MMC   (1U)

Determines the type of card is MMC.

◆ MMCSD_CARD_EMMC

#define MMCSD_CARD_EMMC   (2U)

Determines the type of card is MMC.

◆ MMCSD_CARD_TYPE_NO_DEVICE

#define MMCSD_CARD_TYPE_NO_DEVICE   (3U)

◆ MMCSD_CMD_SETBUSWIDTH

#define MMCSD_CMD_SETBUSWIDTH   (MMCSD_CMD_RESERVED + 0U)

Set bus width of MMCSD.

◆ MMCSD_CMD_SETFREQUENCY

#define MMCSD_CMD_SETFREQUENCY   (MMCSD_CMD_RESERVED + 1U)

Set bus frequency of MMCSD.

◆ MMCSD_CMD_GETBUSWIDTH

#define MMCSD_CMD_GETBUSWIDTH   (MMCSD_CMD_RESERVED + 2U)

Get bus width of MMCSD.

◆ MMCSD_CMD_GETFREQUENCY

#define MMCSD_CMD_GETFREQUENCY   (MMCSD_CMD_RESERVED + 3U)

Get bus frequency of MMCSD.

◆ MMCSD_CMD_GETMEDIAPARAMS

#define MMCSD_CMD_GETMEDIAPARAMS   (MMCSD_CMD_RESERVED + 4U)

Get media (SD/eMMC/MMC) parameters.

◆ MMCSD_INVALID_MUXNUM

#define MMCSD_INVALID_MUXNUM   (-1)

Invalid Mux num.

◆ MMCSD_INVALID_MUX_EVENTNUM

#define MMCSD_INVALID_MUX_EVENTNUM   (-1)

Invalid Mux In/Out event num.

◆ MMCSD_BUS_WIDTH_1BIT

#define MMCSD_BUS_WIDTH_1BIT   (1U)

Card bus width configuration for 1-bit mode.

◆ MMCSD_BUS_WIDTH_4BIT

#define MMCSD_BUS_WIDTH_4BIT   (4U)

Card bus width configuration for 4-bit mode.

◆ MMCSD_BUS_WIDTH_8BIT

#define MMCSD_BUS_WIDTH_8BIT   (8U)

Card bus width configuration for 8-bit mode.

◆ MMCSD_TRANSPEED_25MBPS

#define MMCSD_TRANSPEED_25MBPS   (0x32U)

Card bus frequency configuration for 25 Mbps.

◆ MMCSD_TRANSPEED_50MBPS

#define MMCSD_TRANSPEED_50MBPS   (0x5AU)

Card bus frequency configuration for 50 Mbps.

◆ MMCSD_TRANSPEED_DEFAULT

#define MMCSD_TRANSPEED_DEFAULT   (0x32U)

Card bus frequency configuration for 25 Mbps.

◆ MMCSD_TRANSPEED_HS

#define MMCSD_TRANSPEED_HS   (0x5AU)

Card bus frequency configuration for 50 Mbps.

◆ MMCSD_TRANSPEED_SDR12

#define MMCSD_TRANSPEED_SDR12   (0x32U)

Card bus frequency configuration for 25 Mbps.

◆ MMCSD_TRANSPEED_SDR25

#define MMCSD_TRANSPEED_SDR25   (0x5AU)

Card bus frequency configuration for 50 Mbps.

◆ MMCSD_TRANSPEED_SDR50

#define MMCSD_TRANSPEED_SDR50   (0xBU)

Card bus frequency configuration for 100 Mbps.

◆ MMCSD_TRANSPEED_SDR104

#define MMCSD_TRANSPEED_SDR104   (0x2BU)

Card bus frequency configuration for 200 Mbps.

◆ MMCSD_TRANSPEED_DDR50

#define MMCSD_TRANSPEED_DDR50   (0x3BU)

Card bus frequency configuration for 100 Mbps.

◆ MMCSD_TRANSPEED_HS200

#define MMCSD_TRANSPEED_HS200   (0x2BU)

Card bus frequency configuration for 200 Mbps.

◆ MMCSD_LOOPBACK_ANY

#define MMCSD_LOOPBACK_ANY   (0x0U)

MMC any loop back.

◆ MMCSD_LOOPBACK_INTERNAL

#define MMCSD_LOOPBACK_INTERNAL   (0x1U)

MMC internal loop back.

◆ MMCSD_LOOPBACK_PAD

#define MMCSD_LOOPBACK_PAD   (0x2U)

MMC pad loop back.

◆ MMCSD_VOLTAGE_ANY

#define MMCSD_VOLTAGE_ANY   (0x0U)

MMC any operating voltage.

Typedef Documentation

◆ MMCSD_Handle

typedef void* MMCSD_Handle

◆ MMCSD_iodelayFxn

typedef int32_t(* MMCSD_iodelayFxn) (uint32_t instanceNum, MMCSD_ioDelayParams *iodelayParams)

Return status of MMCSD.

◆ MMCSD_switchVoltage

typedef int32_t(* MMCSD_switchVoltage) (uint32_t controllerNum, MMCSD_BusVoltage voltage)

A function pointer to set the voltage of the MMC I/O Cells and PBAIS to the desired voltage.

◆ MMCSD_inputClockControl

typedef uint32_t(* MMCSD_inputClockControl) (uint32_t instNum, uint32_t *clkFreq, MMCSD_inputClkCtrlMode_e)

A function pointer to read/configure the input clock to the MMC controller.

Enumeration Type Documentation

◆ MMCSD_resetLineMask

MMCSD instance attributes - used during init time.

A function pointer to configure iodelay.

Enumerates the types of lines fore hs mmcsd reset.

Enumerator
MMCSD_RESET_LINE_MASK_DATA 

Data line reset.

MMCSD_RESET_LINE_MASK_CMD 

Command line reset.

MMCSD_RESET_LINE_MASK_ALL 

Reset of all the lines.

◆ MMCSD_clkAct

Enumerates the clock activity configurations during wake up .

Enumerator
MMCSD_CLK_ACT_ICLK_FCLK_OFF 

Both functional and interface clocks are off.

MMCSD_CLK_ACT_FCLK_OFF 

Interface clock is on and Functional clock is off.

MMCSD_CLK_ACT_ICLK_OFF 

Interface clock is off and Functional clock is on.

MMCSD_CLK_ACT_ICLK_FLCK_ON 

Both functional and interface clocks are on.

◆ MMCSD_standbyMode

Enumerates the standby modes.

Enumerator
MMCSD_STANDBY_MODE_FORCE 

Force standby mode.

MMCSD_STANDBY_MODE_NONE 

No standby mode.

MMCSD_STANDBY_MODE_SMART 

Smart standby mode.

MMCSD_STANDBY_MODE_SMART_WAKEUP 

Smart standby with wakeup mode.

◆ MMCSD_pwrCtrl

Enumerates macros to configure power on/off.

Enumerator
MMCSD_PWR_CTRL_ON 

Power on the controller.

MMCSD_PWR_CTRL_OFF 

Power off the controller.

◆ MMCSD_suppVolt

Enumerates the list of supported bus voltages.

Enumerator
MMCSD_SUPP_VOLT_1P8 

Supported voltage is 1.8 Volts.

MMCSD_SUPP_VOLT_3P0 

Supported voltage is 3.0 Volts.

MMCSD_SUPP_VOLT_3P3 

Supported voltage is 3.3 Volts.

◆ MMCSD_cmdType

Enumerates the list of command types.

Enumerator
MMCSD_CMD_TYPE_OTHER 

Others commands.

MMCSD_CMD_TYPE_BUS_SUSPEND 

Upon CMD52 "Bus Suspend" operation.

MMCSD_CMD_TYPE_FUNC_SEL 

Upon CMD52 "Function Select" operation.

MMCSD_CMD_TYPE_IO_ABORT 

Upon CMD12 or CMD52 "I/O Abort" command.

◆ MMCSD_rspType

Enumerates the list of response types.

Enumerator
MMCSD_RSP_TYPE_NONE 

No response.

MMCSD_RSP_TYPE_LEN_136 

Response Length 136 bits.

MMCSD_RSP_TYPE_LEN_48 

Response Length 48 bits.

MMCSD_RSP_TYPE_LEN_48_BUSY 

Response Length 48 bits with busy after response.

◆ MMCSD_xFerType

Enumerates the list of response types.

Enumerator
MMCSD_XFER_TYPE_TX 

Data Write (host to card).

MMCSD_XFER_TYPE_RX 

Data Read (card to host).

◆ MMCSD_intrMask

Enumerates the controller's interrupt masks.

Enumerator
MMCSD_INTR_MASK_BADACCESS 

Bad access to data space interrupt.

MMCSD_INTR_MASK_CARDERROR 

Card error interrupt.

MMCSD_INTR_MASK_ADMAERROR 

ADMA error interrupt.

MMCSD_INTR_MASK_ACMD12ERR 

Auto CMD12 error interrupt.

MMCSD_INTR_MASK_DATABITERR 

Data end bit error interrupt.

MMCSD_INTR_MASK_DATACRCERR 

Data CRC error interrupt.

MMCSD_INTR_MASK_DATATIMEOUT 

Data time out error interrupt.

MMCSD_INTR_MASK_CMDINDXERR 

Command index error interrupt.

MMCSD_INTR_MASK_CMDBITERR 

Command end bit error.

MMCSD_INTR_MASK_CMDCRCERR 

Command CRC error interrupt.

MMCSD_INTR_MASK_CMDTIMEOUT 

Command timeout error interrupt.

MMCSD_INTR_MASK_ERR 

Error interrupt.

MMCSD_INTR_MASK_CARDREM 

Card removal signal interrupt.

MMCSD_INTR_MASK_CARDINS 

Card insertion signal interrupt.

MMCSD_INTR_MASK_BUFRDRDY 

Buffer read ready interrupt.

MMCSD_INTR_MASK_BUFWRRDY 

Buffer write ready interrupt.

MMCSD_INTR_MASK_TRNFCOMP 

Transfer completed signal interrupt.

MMCSD_INTR_MASK_CMDCOMP 

Command completed signal interrupt.

◆ MMCSD_idleMode

Enumerates the idle modes.

Enumerator
MMCSD_IDLE_MODE_FORCE 

Force idle mode.

MMCSD_IDLE_MODE_NONE 

No idle mode.

MMCSD_IDLE_MODE_SMART 

Smart idle mode.

◆ MMCSD_busVolt

Enumerates mmc sd controller's bus voltages.

Enumerator
MMCSD_BUS_VOLT_1P8 

Bus voltage is 1.8 Volts.

MMCSD_BUS_VOLT_3P0 

Bus voltage is 3.0 volts.

MMCSD_BUS_VOLT_3P3 

Bus voltage is 3.3 volts.

◆ MMCSD_BusVoltage

Enumerator
MMCSD_BUS_VOLTAGE_1_8V 
MMCSD_BUS_VOLTAGE_3_0V 
MMCSD_BUS_VOLTAGE_3_3V 

◆ MMCSD_inputClkCtrlMode_e

ENUMs to read/configure the input clock to the MMC controller.

Enumerator
MMCSD_INPUT_CLOCK_CTRL_GET 
MMCSD_INPUT_CLOCK_CTRL_SET 

Function Documentation

◆ MMCSD_init()

void MMCSD_init ( void  )

This function initializes the MMCSD module.

◆ MMCSD_deinit()

void MMCSD_deinit ( void  )

This function de-initializes the MMCSD module.

◆ MMCSD_Params_init()

void MMCSD_Params_init ( MMCSD_Params mmcsdParams)

Initialize data structure with defaults.

Parameters
mmcsdParams[out] Initialized parameters

◆ MMCSD_open()

MMCSD_Handle MMCSD_open ( uint32_t  index,
const MMCSD_Params openParams 
)

This function opens a given MMCSD peripheral.

Precondition
MMCSD controller has been initialized using MMCSD_init()
Parameters
indexIndex of config to use in the MMCSD_Config array
openParamsPointer to parameters to open the driver with
Returns
A MMCSD_Handle on success or a NULL on an error or if it has been opened already
See also
MMCSD_init()
MMCSD_close()

◆ MMCSD_close()

void MMCSD_close ( MMCSD_Handle  handle)

Function to close a MMCSD peripheral specified by the MMCSD handle.

Precondition
MMCSD_open() has to be called first
Parameters
handleMMCSD_Handle returned from MMCSD_open()
See also
MMCSD_open()

◆ MMCSD_getHandle()

MMCSD_Handle MMCSD_getHandle ( uint32_t  index)

This function returns the handle of an open MMCSD Instance from the instance index.

Precondition
MMCSD controller has been opened using MMCSD_open()
Parameters
indexIndex of config to use in the MMCSD_Config array
Returns
An MMCSD_Handle if it has been opened already or NULL otherwise
See also
MMCSD_init()
MMCSD_open()

◆ MMCSD_read()

int32_t MMCSD_read ( MMCSD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Function to perform block reads from the MMC/SD media.

Parameters
handleMMCSD_Handle returned from MMCSD_open()
bufPointer to a buffer to which the data is to be read into
startBlkBlock to start reading data from
numBlksNumber of blocks to read
Returns
SystemP_SUCCESS on successful read; else error on failure
See also
MMCSD_open

◆ MMCSD_write()

int32_t MMCSD_write ( MMCSD_Handle  handle,
uint8_t *  buf,
uint32_t  startBlk,
uint32_t  numBlks 
)

Function to perform block writes to the MMC/SD media.

Parameters
handleMMCSD_Handle returned from MMCSD_open()
bufPointer to a buffer to which the data is to be read into
startBlkBlock to start reading data from
numBlksNumber of blocks to read
Returns
SystemP_SUCCESS on successful read; else error on failure
See also
MMCSD_open

◆ MMCSD_getBlockSize()

uint32_t MMCSD_getBlockSize ( MMCSD_Handle  handle)

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

Precondition
MMCSD controller has been opened using MMCSD_open()
Parameters
handleMMCSD_Handle returned from MMCSD_open()
Returns
Block size of the media
See also
MMCSD_init()
MMCSD_open()

◆ MMCSD_getBlockCount()

uint32_t MMCSD_getBlockCount ( MMCSD_Handle  handle)

This function returns the block count of User Data Area of the MMC/SD media connected to the MMCSD controller.

Precondition
MMCSD controller has been opened using MMCSD_open()
Parameters
handleMMCSD_Handle returned from MMCSD_open()
Returns
Block size of the media
See also
MMCSD_init()
MMCSD_open()

Variable Documentation

◆ gMmcsdConfig

MMCSD_Config gMmcsdConfig[]
extern

Externally defined driver configuration array.

◆ gMmcsdConfigNum

uint32_t gMmcsdConfigNum
extern

Externally defined driver configuration array size.