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 void* PMIC_Handle |
Handle to the PMIC driver returned by PMIC_open()
typedef struct PMIC_Config_s PMIC_Config |
Forward declaration of PMIC_Config.
typedef struct PMIC_Params_s PMIC_Params |
Forward declaration of PMIC_Params.
void PMIC_init | ( | void | ) |
This function initializes the PMIC module.
void PMIC_deinit | ( | void | ) |
This function de-initializes the PMIC module.
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.
instanceId | [IN] Index within PMIC_Config gPmicConfig[] denoting the PMIC driver to open |
params | [IN] Open parameters |
PMIC_Handle PMIC_getHandle | ( | uint32_t | instanceId | ) |
Get handle to PMIC driver.
instanceId | [in] Index within PMIC_Config gPmicConfig[] |
void PMIC_close | ( | PMIC_Handle | handle | ) |
Close PMIC driver.
handle | [IN] PMIC driver handle from PMIC_open |
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.
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.