AM273x MCU+ SDK  09.02.00
drivers/esm/v0/esm.h File Reference

Introduction

ESM Driver API/interface file.

Go to the source code of this file.

Data Structures

struct  ESM_GroupIntrStatus
 Structure to access the status of interrupts belonging to a group. More...
 
struct  ESM_NotifyParams
 Parameters used to register the ESM notify function to handle Group1 and Group2 errors. The notify function will be invoked post the ESM FIQ interrupt handler processing. More...
 
struct  ESM_OpenParams
 ESM Open Parameters. More...
 
struct  ESM_Attrs
 ESM Hardware Atrributes. More...
 
struct  ESM_Object
 ESM Driver Object. More...
 
struct  ESM_Config
 ESM Instance configuration. More...
 

Macros

#define ESM_ERRNO_BASE   (-3000)
 ESM driver error base. More...
 
#define ESM_EINVAL   (ESM_ERRNO_BASE-1)
 Error Code: Invalid argument
More...
 
#define ESM_ENOINIT   (ESM_ERRNO_BASE-2)
 Error Code: Operation cannot be done as ESM_open is not done. More...
 
#define ESM_EREINIT   (ESM_ERRNO_BASE-3)
 Error Code: Operation cannot be done as ESM_open is already done and re-init is not permitted. More...
 
#define ESM_ENOMEM   (ESM_ERRNO_BASE-4)
 Error Code: Out of memory. More...
 
#define ESM_MAX_NOTIFIERS   (4U)
 Maximum number of notify callbacks supported. More...
 
#define ESM_MAX_ISR_COUNT   (4U)
 Maximum ISR supported. More...
 

Typedefs

typedef void * ESM_Handle
 A handle that is returned from a ESM_open() call. More...
 
typedef void(* ESM_CallBack) (void *arg)
 Callback function which is invoked by the ESM module if a notify function is registered using the ESM_registerNotifier() API. More...
 

Enumerations

enum  ESM_IntrPriorityLvl { ESM_INTR_PRIORITY_LEVEL_LOW = 0x0U, ESM_INTR_PRIORITY_LEVEL_HIGH = 0x1U }
 Enum to select level for interrupt. More...
 
enum  ESM_OperationMode { ESM_OPERATION_MODE_NORMAL = ESM_ESMEKR_EKEY_NORMAL_MODE, ESM_OPERATION_MODE_ERROR_FORCE = ESM_ESMEKR_EKEY_ERROR_FORCE_MODE }
 Enum to select the ESM Operation Mode. More...
 

Functions

void ESM_init (void)
 The functions initializes the ESM module. More...
 
void ESM_deinit (void)
 The functions de-initializes the ESM module. More...
 
ESM_Handle ESM_open (uint32_t index, ESM_OpenParams *params)
 Opens a ESM object with the index and parameters specified, and returns a ESM_Handle. More...
 
void ESM_close (ESM_Handle handle)
 The function closes a ESM peripheral specified by the ESM handle. More...
 
int32_t ESM_registerNotifier (ESM_Handle handle, ESM_NotifyParams *params, int32_t *errCode)
 Register the notifers. The ESM module will call back if error interrupt is detected. More...
 
int32_t ESM_deregisterNotifier (ESM_Handle handle, int32_t notifyIndex, int32_t *errCode)
 Deregister the ESM notifers. More...
 
void ESM_setMode (uint32_t baseAddr, uint32_t mode)
 This API is used to configure operation mode of ESM module. More...
 
int32_t ESM_setErrPinLowTimePreload (uint32_t baseAddr, uint32_t lowTime)
 This API is used to configure the low time counter pre-load value. More...
 
uint32_t ESM_getCurrErrPinLowTimeCnt (uint32_t baseAddr)
 This API is used to get the current value of low time counter. More...
 
uint32_t ESM_getErrPinStatus (uint32_t baseAddr)
 This API is used to get the current status of nERROR pin. More...
 
void ESM_resetErrPin (uint32_t baseAddr)
 This API is used to reset the nERROR pin. This will set the nERROR pin to high. More...
 
uint32_t ESM_getIntrStatus (uint32_t baseAddr, uint32_t intrSrc)
 This API is used to get the interrupt status. More...
 
int32_t ESM_getGroupIntrStatus (uint32_t baseAddr, uint32_t grpNum, ESM_GroupIntrStatus *intrstatus)
 This API is used to get the interrupt/error status for a group. More...
 
static void ESM_Params_init (ESM_OpenParams *openPrms)
 

Variables

ESM_Config gEsmConfig []
 Externally defined driver configuration array. More...
 
uint32_t gEsmConfigNum
 Externally defined driver configuration array size. More...