AM62Px MCU+ SDK  10.01.00

Introduction

This module contains APIs to program and use the PMIC module on the board.

See PMIC for more details.

Data Structures

struct  PMIC_Config
 PMIC driver configuration, these are filled by SysCfg based on the device that is selected. More...
 
struct  PMIC_Params
 Parameters passed during PMIC_open() More...
 

Functions

void PMIC_init (void)
 This function initializes the PMIC module. More...
 
void PMIC_deinit (void)
 This function de-initializes the PMIC module. More...
 
PMIC_Handle PMIC_open (uint32_t instanceId, const PMIC_Params *params)
 Open PMIC driver. More...
 
PMIC_Handle PMIC_getHandle (uint32_t instanceId)
 Get handle to PMIC driver. More...
 
void PMIC_close (PMIC_Handle handle)
 Close PMIC driver. More...
 
void PMIC_critSecStartFn (void)
 Initiates the start of a critical section for PMIC operations. This function attempts to acquire a semaphore, which is typically used to ensure exclusive access to resources during PMIC operations. More...
 
void PMIC_critSecStopFn (void)
 Concludes a critical section for PMIC operations. This function releases the semaphore, signifying the end of a critical section initiated by a corresponding "start" function. More...
 

Typedefs

typedef void * PMIC_Handle
 Handle to the PMIC driver returned by PMIC_open() More...
 
typedef struct PMIC_Config_s PMIC_Config
 Forward declaration of PMIC_Config. More...
 
typedef struct PMIC_Params_s PMIC_Params
 Forward declaration of PMIC_Params. More...
 

Typedef Documentation

◆ PMIC_Handle

typedef void* PMIC_Handle

Handle to the PMIC driver returned by PMIC_open()

◆ PMIC_Config

typedef struct PMIC_Config_s PMIC_Config

Forward declaration of PMIC_Config.

◆ PMIC_Params

typedef struct PMIC_Params_s PMIC_Params

Forward declaration of PMIC_Params.

Function Documentation

◆ PMIC_init()

void PMIC_init ( void  )

This function initializes the PMIC module.

◆ PMIC_deinit()

void PMIC_deinit ( void  )

This function de-initializes the PMIC module.

◆ PMIC_open()

PMIC_Handle PMIC_open ( uint32_t  instanceId,
const PMIC_Params params 
)

Open PMIC driver.

Make sure the SOC peripheral driver is open'ed before calling this API. Drivers_open function generated by SysCfg opens the underlying SOC peripheral driver, e.g I2C

Global variables PMIC_Config gPmicConfig[] and uint32_t gPmicConfigNum is instantiated by SysCfg to describe the PMIC configuration based on user selection in SysCfg.

Parameters
instanceId[IN] Index within PMIC_Config gPmicConfig[] denoting the PMIC driver to open
params[IN] Open parameters
Returns
Handle to PMIC driver which should be used in subsequent API call Else returns NULL in case of failure

◆ PMIC_getHandle()

PMIC_Handle PMIC_getHandle ( uint32_t  instanceId)

Get handle to PMIC driver.

Parameters
instanceId[in] Index within PMIC_Config gPmicConfig[]
Returns
Handle to pmic driver
NULL in case of failure

◆ PMIC_close()

void PMIC_close ( PMIC_Handle  handle)

Close PMIC driver.

Parameters
handle[IN] PMIC driver handle from PMIC_open

◆ PMIC_critSecStartFn()

void PMIC_critSecStartFn ( void  )

Initiates the start of a critical section for PMIC operations. This function attempts to acquire a semaphore, which is typically used to ensure exclusive access to resources during PMIC operations.

◆ PMIC_critSecStopFn()

void PMIC_critSecStopFn ( void  )

Concludes a critical section for PMIC operations. This function releases the semaphore, signifying the end of a critical section initiated by a corresponding "start" function.