AM261x MCU+ SDK  10.02.00
APIs for I2C/MCSPI based PMIC driver

Introduction

This module contains APIs to program and use I2C/MCSPI based PMIC module on the board.

See PMIC for more details.

Data Structures

struct  PMIC_Params
 Parameters passed during PMIC_open() More...
 
struct  PMIC_Fxns
 Driver implementation callbacks. More...
 
struct  PMIC_Config
 PMIC driver configuration, these are filled by SysCfg based on the device that is selected. More...
 
struct  PMIC_Object
 PMIC driver object - not to be used by application. More...
 

Functions

PMIC_Handle PMIC_open (uint32_t instanceId, const PMIC_Params *params)
 Open PMIC driver. More...
 
int32_t PMIC_configure (PMIC_Handle handle)
 Configure PMIC driver. More...
 
Pmic_CoreHandle_t * PMIC_getCoreHandle (uint32_t index)
 Get handle to PMIC Pmic_CoreHandle_t driver. More...
 
void PMIC_close (PMIC_Handle handle)
 Close PMIC driver. More...
 

Typedefs

typedef void * PMIC_Handle
 Handle to the PMIC driver returned by PMIC_open() More...
 

PMIC driver implementation callbacks

typedef int32_t(* PMIC_OpenFxn) (PMIC_Config *config, const PMIC_Params *params)
 Driver implementation to open a specific PMIC driver. More...
 
typedef int32_t(* PMIC_ConfigureFxn) (PMIC_Config *config)
 Driver implementation to configure the specific PMIC driver. More...
 
typedef void(* PMIC_CloseFxn) (PMIC_Config *config)
 Driver implementation to close a specific PMIC driver. More...
 

Typedef Documentation

◆ PMIC_Handle

typedef void* PMIC_Handle

Handle to the PMIC driver returned by PMIC_open()

◆ PMIC_OpenFxn

typedef int32_t(* PMIC_OpenFxn) (PMIC_Config *config, const PMIC_Params *params)

Driver implementation to open a specific PMIC driver.

Typically this callback is hidden from the end application and is implemented when a new type of PMIC device needs to be implemented.

Parameters
config[IN] PMIC configuration for the specific PMIC device
params[IN] User controllable parameters when opening the PMIC device
Returns
SystemP_SUCCESS on success, else failure

◆ PMIC_ConfigureFxn

typedef int32_t(* PMIC_ConfigureFxn) (PMIC_Config *config)

Driver implementation to configure the specific PMIC driver.

Typically this callback is hidden from the end application and is implemented when a new type of PMIC device needs to be implemented.

Parameters
config[IN] PMIC configuration for the specific PMIC device
Returns
SystemP_SUCCESS on success, else failure

◆ PMIC_CloseFxn

typedef void(* PMIC_CloseFxn) (PMIC_Config *config)

Driver implementation to close a specific PMIC driver.

Typically this callback is hidden from the end application and is implemented when a new type of PMIC device needs to be implemented.

Parameters
config[IN] PMIC configuration for the specific PMIC device
Returns
SystemP_SUCCESS on success, else failure

Function Documentation

◆ 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 MCSPI

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_configure()

int32_t PMIC_configure ( PMIC_Handle  handle)

Configure PMIC driver.

Parameters
handle[IN] PMIC driver handle from PMIC_open

◆ PMIC_getCoreHandle()

Pmic_CoreHandle_t* PMIC_getCoreHandle ( uint32_t  index)

Get handle to PMIC Pmic_CoreHandle_t driver.

Parameters
index[in] Index within PMIC_Config gPmicConfig[]
Returns
Handle to Pmic_CoreHandle_t
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

Variable Documentation

◆ gPmicConfig

PMIC_Config gPmicConfig[]
extern

◆ gPmicConfigNum

uint32_t gPmicConfigNum
extern