PDK API Guide for J721E
MMCSD.h File Reference

Introduction

MMCSD driver interface.

============================================================================

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


Go to the source code of this file.

Data Structures

struct  MMCSD_ConfigParams
 SD Parameters. More...
 
struct  MMCSD_FxnTable
 The definition of a SD function table that contains the required set of functions to control a specific SD driver implementation. More...
 
struct  MMCSD_Config
 SD Global configuration. More...
 
struct  MMCSD_mediaParams
 Parameters of the media attached to the controller. More...
 

Macros

#define MMCSD_MAX_CONFIG_CNT   (5U)
 
#define MMCSD_OK   (0)
 
#define MMCSD_CMD_RESERVED   (32U)
 
#define MMCSD_ERR   (-(1))
 
#define MMCSD_UNDEFINEDCMD   (-(2))
 
#define MMCSD_ERR_1P8V_SWITCH_CARD_NOT_RESPONDING   (-(3))
 
#define MMCSD_ERR_1P8V_SWITCH_MMCIO_SWITCH_FAILURE   (-(4))
 
#define MMCSD_ERR_1P8V_SWITCH_CARD_CMD11_FAILURE   (-(5))
 
#define MMCSD_ERR_INVALID_FREQ   (-(6))
 
#define MMCSD_ERR_FREQ_SWITCH_UNSUCCESSFUL   (-(7))
 
#define MMCSD_ERR_VOLTAGE_SWITCH_FAILURE   (-(8))
 
#define MMCSD_ERR_SET_SOC_INTERRUPT_PATH   (-(9))
 
#define MMCSD_ERR_REL_SOC_INTERRUPT_PATH   (-(10))
 
#define MMCSD_ERR_TUNING_CMD_ERROR   (-(11))
 

Typedefs

typedef int32_t MMCSD_Error
 Return status of MMCSD. More...
 
typedef void * MMCSD_Handle
 A handle that is returned from a MMCSD_open() call. More...
 
typedef void * MMCSD_Params
 A handle that is returned from a MMCSD_open() call. More...
 
typedef void(* MMCSD_CardDetectCallbackFxn) (MMCSD_Handle handle, uint32_t temp)
 MMCSD callback function. More...
 
typedef MMCSD_Error(* MMCSD_CloseFxn) (MMCSD_Handle handle)
 A function pointer to a driver specific implementation of MMCSD_close(). More...
 
typedef MMCSD_Error(* MMCSD_ControlFxn) (MMCSD_Handle handle, uint32_t cmd, const void *arg)
 A function pointer to a driver specific implementation of MMCSD_control(). More...
 
typedef MMCSD_Error(* MMCSD_InitFxn) (MMCSD_Handle handle)
 A function pointer to a driver specific implementation of MMCSD_init(). More...
 
typedef MMCSD_Error(* MMCSD_OpenFxn) (MMCSD_Handle handle, MMCSD_Params params)
 A function pointer to a driver specific implementation of MMCSD_open(). More...
 
typedef MMCSD_Error(* MMCSD_WriteFxn) (MMCSD_Handle handle, uint8_t *buf, uint32_t block, uint32_t numBlks)
 A function pointer to a driver specific implementation of MMCSD_write(). More...
 
typedef MMCSD_Error(* MMCSD_ReadFxn) (MMCSD_Handle handle, uint8_t *buf, uint32_t block, uint32_t numBlks)
 A function pointer to a driver specific implementation of MMCSD_read(). More...
 
typedef MMCSD_Config MMCSD_Config_list[MMCSD_MAX_CONFIG_CNT]
 

Functions

MMCSD_Error MMCSD_close (MMCSD_Handle handle)
 Function to close a SD peripheral specified by the SD handle. More...
 
MMCSD_Error MMCSD_control (MMCSD_Handle handle, uint32_t cmd, void *arg)
 Function performs implementation specific features on a given MMCSD_Handle. More...
 
MMCSD_Error MMCSD_init (void)
 Function to initializes the SD module. More...
 
MMCSD_Error MMCSD_open (uint32_t index, MMCSD_Params params, MMCSD_Handle *handle)
 Function to initialize a given SD peripheral specified by the particular index value. The parameter specifies which mode the SD will operate. More...
 
MMCSD_Error MMCSD_Params_init (MMCSD_Params params)
 Function to initialize the MMCSD_Params struct to its defaults. More...
 
MMCSD_Error MMCSD_write (MMCSD_Handle handle, uint8_t *buf, uint32_t block, uint32_t numBlks)
 Function that handles the SD write for SYS/BIOS. More...
 
MMCSD_Error MMCSD_read (MMCSD_Handle handle, uint8_t *buf, uint32_t block, uint32_t numBlks)
 Function that handles the SD read for SYS/BIOS. More...
 

Variables

const MMCSD_FxnTable MMCSD_fxnTable
 
const MMCSD_Config_list MMCSD_config