![]() |
PDK API Guide for J721E
|
PMIC Driver RTC API/interface file.
Go to the source code of this file.
Data Structures | |
struct | Pmic_RtcTime_t |
RTC time configuration. The Pmic_RtcTime_s structure contains set of time parameters to set/get the RTC time. More... | |
struct | Pmic_RtcDate_t |
RTC Date configuration. The Pmic_RtcDate_s structure contains set of date parameters to set/get the RTC Date. More... | |
struct | Pmic_RtcRstStatus_t |
RTC Reset Status The Pmic_RtcRstStatus_s structure contains status of RTC Reset and power-up status. Note: validParams is input param for all Get APIs. other params except validParams is output param for Get APIs. More... | |
struct | Pmic_RtcCfg_t |
RTC configuration The Pmic_RtcRstStatus_s structure contains status of RTC Reset and power-up status. Note: validParams is input param for all Set and Get APIs. other params except validParams is input param for Set APIs and output param for Get APIs. More... | |
Macros | |
PMIC RTC timer interrupt Period Values. | |
#define | PMIC_RTC_SECOND_INTR_PERIOD (0x0U) |
#define | PMIC_RTC_MINUTE_INTR_PERIOD (0x1U) |
#define | PMIC_RTC_HOUR_INTR_PERIOD (0x2U) |
#define | PMIC_RTC_DAY_INTR_PERIOD (0x3U) |
PMIC RTC alarm interrupt Enable/Disable | |
#define | PMIC_RTC_ALARM_INTR_ENABLE 1U |
#define | PMIC_RTC_ALARM_INTR_DISABLE 0U |
PMIC RTC timer interrupt Enable/Disable | |
#define | PMIC_RTC_TIMER_INTR_ENABLE 1U |
#define | PMIC_RTC_TIMER_INTR_DISABLE 0U |
PMIC RTC Time Mode | |
#define | PMIC_RTC_24_HOUR_MODE (0x0U) |
#define | PMIC_RTC_12_HOUR_MODE (0x1U) |
PMIC RTC Meridien Mode | |
#define | PMIC_RTC_AM_MODE (0x0U) |
#define | PMIC_RTC_PM_MODE (0x1U) |
PMIC RTC State to START/STOP RTC | |
#define | PMIC_RTC_STOP 0U |
#define | PMIC_RTC_START 1U |
PMIC RTC Current Status | |
#define | PMIC_RTC_STATUS_FROZEN (0x0U) |
#define | PMIC_RTC_STATUS_RUNNING (0x1U) |
PMIC RTC Reset Status | |
#define | PMIC_RTC_RST_STATUS_RESET_VAL (0x0U) |
RESET_STATUS_RTC reset value when RTC domain is powered down. More... | |
#define | PMIC_RTC_RST_STATUS_SET_VAL (0x1U) |
Used to set RESET_STATUS_RTC register bit field. More... | |
PMIC RTC power-up Status | |
#define | PMIC_RTC_POWERUP_STATUS_CLR_VAL (0x0U) |
Used to clear POWERUP_STATUS register bit field. More... | |
#define | PMIC_RTC_POWERUP_STATUS_RESET_VAL (0x1U) |
POWERUP_STATUS reset value when RTC domain is powered down. More... | |
PMIC RTC Week Days | |
#define | PMIC_RTC_WEEKDAY_SUNDAY (1U) |
#define | PMIC_RTC_WEEKDAY_MONDAY (2U) |
#define | PMIC_RTC_WEEKDAY_TUESDAY (3U) |
#define | PMIC_RTC_WEEKDAY_WEDNESDAY (4U) |
#define | PMIC_RTC_WEEKDAY_THURSDAY (5U) |
#define | PMIC_RTC_WEEKDAY_FRIDAY (6U) |
#define | PMIC_RTC_WEEKDAY_SATURDAY (7U) |
PMIC RTC Months | |
#define | PMIC_RTC_MONTH_JAN (1U) |
#define | PMIC_RTC_MONTH_FEB (2U) |
#define | PMIC_RTC_MONTH_MAR (3U) |
#define | PMIC_RTC_MONTH_APR (4U) |
#define | PMIC_RTC_MONTH_MAY (5U) |
#define | PMIC_RTC_MONTH_JUN (6U) |
#define | PMIC_RTC_MONTH_JUL (7U) |
#define | PMIC_RTC_MONTH_AUG (8U) |
#define | PMIC_RTC_MONTH_SEP (9U) |
#define | PMIC_RTC_MONTH_OCT (10U) |
#define | PMIC_RTC_MONTH_NOV (11U) |
#define | PMIC_RTC_MONTH_DEC (12U) |
PMIC RTC 32k Counter Configuration | |
#define | PMIC_RTC_32K_COUNTER_COMP_VAL_SET (0x1U) |
Set 32K counter with RTC compensation values. More... | |
Selects PMIC RTC Crystal Oscillator Configuration | |
#define | PMIC_RTC_CRYSTAL_OSC_DISABLE (0x0U) |
#define | PMIC_RTC_CRYSTAL_OSC_ENABLE (0x1U) |
PMIC RTC round the time to closest minute | |
#define | PMIC_RTC_ROUND_TIME_SET (0x1U) |
Round the time to closest minute. More... | |
PMIC RTC Time Date Register Selection | |
#define | PMIC_RTC_DYNAMIC_REG_SEL (0x0U) |
RTC register read from Dynamic registers. More... | |
#define | PMIC_RTC_STATIC_SHADOWED_REG_SEL (0x1U) |
RTC register read from Static Shadowed registers. More... | |
Selects PMIC RTC Crystal Oscillator Type | |
#define | PMIC_RTC_CRYSTAL_OSC_TYPE_6PF (0x0U) |
Selects Crystal Oscillator type as 6PF. More... | |
#define | PMIC_RTC_CRYSTAL_OSC_TYPE_9PF (0x1U) |
Selects Crystal Oscillator type as 9PF. More... | |
#define | PMIC_RTC_CRYSTAL_OSC_TYPE_12_5PF (0x2U) |
Selects Crystal Oscillator type as 12.5PF. More... | |
Selects PMIC RTC Reset Status Type | |
#define | PMIC_RTC_RST_STATUS (0x0U) |
Selects RTC Reset Status. More... | |
#define | PMIC_RTC_POWERUP_STATUS (0x1U) |
Selects RTC Powerup Status. More... | |
PMIC RTC Time strcture Param Bit Positions | |
#define | PMIC_RTC_TIME_CFG_SEC_VALID (0U) |
validParams value used to set/get Value to represent the Seconds More... | |
#define | PMIC_RTC_TIME_CFG_MIN_VALID (1U) |
validParams value used to set/get Value to represent the Minutes More... | |
#define | PMIC_RTC_TIME_CFG_HRS_VALID (2U) |
validParams value used to set/get Value to represent the Hours More... | |
#define | PMIC_RTC_TIME_CFG_TIMEMODE_VALID (3U) |
validParams value used to set/get Time Mode More... | |
#define | PMIC_RTC_TIME_CFG_MERIDIAN_VALID (4U) |
validParams value used to set/get Maridian Mode More... | |
PMIC RTC Time Structure Param Bit shift values | |
Application can use below shifted values to set the validParam member defined in Pmic_RtcTime_t structure | |
#define | PMIC_RTC_TIME_CFG_SEC_VALID_SHIFT (1U << PMIC_RTC_TIME_CFG_SEC_VALID) |
#define | PMIC_RTC_TIME_CFG_MIN_VALID_SHIFT (1U << PMIC_RTC_TIME_CFG_MIN_VALID) |
#define | PMIC_RTC_TIME_CFG_HRS_VALID_SHIFT (1U << PMIC_RTC_TIME_CFG_HRS_VALID) |
#define | PMIC_RTC_TIME_CFG_TIMEMODE_VALID_SHIFT (1U << PMIC_RTC_TIME_CFG_TIMEMODE_VALID) |
#define | PMIC_RTC_TIME_CFG_MERIDIAN_VALID_SHIFT (1U << PMIC_RTC_TIME_CFG_MERIDIAN_VALID) |
PMIC RTC Date strcture Param Bit Positions | |
#define | PMIC_RTC_DATE_CFG_DAY_VALID (0U) |
validParams value used to set/get Value to represent the day More... | |
#define | PMIC_RTC_DATE_CFG_MONTH_VALID (1U) |
validParams value used to set/get Value to represent the Month More... | |
#define | PMIC_RTC_DATE_CFG_YEAR_VALID (2U) |
validParams value used to set/get Value to represent the Year More... | |
#define | PMIC_RTC_DATE_CFG_WEEKDAY_VALID (3U) |
validParams value used to set/get Value to represent the weekday of the week More... | |
PMIC RTC Date Structure Param Bit shift values | |
Application can use below shifted values to set the validParam member defined in Pmic_RtcDate_t structure | |
#define | PMIC_RTC_DATE_CFG_DAY_VALID_SHIFT (1U << PMIC_RTC_DATE_CFG_DAY_VALID) |
#define | PMIC_RTC_DATE_CFG_MONTH_VALID_SHIFT (1U << PMIC_RTC_DATE_CFG_MONTH_VALID) |
#define | PMIC_RTC_DATE_CFG_YEAR_VALID_SHIFT (1U << PMIC_RTC_DATE_CFG_YEAR_VALID) |
#define | PMIC_RTC_DATE_CFG_WEEKDAY_VALID_SHIFT (1U << PMIC_RTC_DATE_CFG_WEEKDAY_VALID) |
PMIC RTC Status strcture Param Bit Positions | |
#define | PMIC_RTC_RESET_STATUS_VALID (0U) |
validParams value used to get reset status of RTC More... | |
#define | PMIC_RTC_POWERUP_STATUS_VALID (1U) |
validParams value used to get power-up status of RTC More... | |
PMIC RTC Status Structure Param Bit shift values | |
Application can use below shifted values to set the validParam member defined in Pmic_RtcRstStatus_t structure | |
#define | PMIC_RTC_RESET_STATUS_VALID_SHIFT (1U << PMIC_RTC_RESET_STATUS_VALID) |
#define | PMIC_RTC_POWERUP_STATUS_VALID_SHIFT (1U << PMIC_RTC_POWERUP_STATUS_VALID) |
PMIC RTC configuration strcture Param Bit Positions | |
#define | PMIC_RTC_CFG_32K_COUNTER_COMP_VAL_SET_VALID (0U) |
validParams value used to set/get configuration of 32K counter with compensation values More... | |
#define | PMIC_RTC_CFG_RTC_TIME_ROUND_30S_SET_VALID (1U) |
validParams value used to set/get configuration of RTC time config to Round the time to closest minute More... | |
#define | PMIC_RTC_CFG_CRYSTAL_OSC_EN_VALID (2U) |
validParams value used to set/get to Enable/Disable Crystal Oscillator More... | |
#define | PMIC_RTC_CFG_TIME_DATE_REG_SEL_VALID (3U) |
validParams value used to set/get to Select RTC Time and Date Register read from Dynamic or Static Shadowed Registers More... | |
#define | PMIC_RTC_CFG_CRYSTAL_OSC_TYPE_VALID (4U) |
validParams value used to set/get to Select Crystal Oscillator Type More... | |
PMIC RTC Configuration Structure Param Bit shift values | |
Application can use below shifted values to set the validParam member defined in Pmic_RtcCfg_t structure | |
#define | PMIC_RTC_CFG_32K_COUNTER_COMP_VAL_SET_VALID_SHIFT (1U << PMIC_RTC_CFG_32K_COUNTER_COMP_VAL_SET_VALID) |
#define | PMIC_RTC_CFG_RTC_TIME_ROUND_30S_SET_VALID_SHIFT (1U << PMIC_RTC_CFG_RTC_TIME_ROUND_30S_SET_VALID) |
#define | PMIC_RTC_CFG_CRYSTAL_OSC_EN_VALID_SHIFT (1U << PMIC_RTC_CFG_CRYSTAL_OSC_EN_VALID) |
#define | PMIC_RTC_CFG_TIME_DATE_REG_SEL_VALID_SHIFT (1U << PMIC_RTC_CFG_TIME_DATE_REG_SEL_VALID) |
#define | PMIC_RTC_CFG_CRYSTAL_OSC_TYPE_VALID_SHIFT (1U << PMIC_RTC_CFG_CRYSTAL_OSC_TYPE_VALID) |
Functions | |
int32_t | Pmic_rtcSetAlarmInfo (Pmic_CoreHandle_t *pPmicCoreHandle, const Pmic_RtcTime_t timeCfg, const Pmic_RtcDate_t dateCfg) |
API to Set the alarm Time and Date to PMIC RTC. More... | |
int32_t | Pmic_rtcGetAlarmInfo (Pmic_CoreHandle_t *pPmicCoreHandle, Pmic_RtcTime_t *pTimeCfg, Pmic_RtcDate_t *pDateCfg) |
API to Get the alarm Time and Date from PMIC RTC function. More... | |
int32_t | Pmic_rtcSetTimerPeriod (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t timerPeriod) |
API to Set the timer interrupt Period to PMIC RTC. More... | |
int32_t | Pmic_rtcGetTimerPeriod (Pmic_CoreHandle_t *pPmicCoreHandle, uint8_t *pTimerPeriod) |
API to Get the timer interrupt period from PMIC RTC. More... | |
int32_t | Pmic_rtcSetTimeDateInfo (Pmic_CoreHandle_t *pPmicCoreHandle, const Pmic_RtcTime_t timeCfg, const Pmic_RtcDate_t dateCfg) |
API to Set the RTC Time and Date to PMIC RTC. More... | |
int32_t | Pmic_rtcGetTimeDateInfo (Pmic_CoreHandle_t *pPmicCoreHandle, Pmic_RtcTime_t *pTimeCfg, Pmic_RtcDate_t *pDateCfg) |
API to Get the RTC Time and Date from PMIC RTC function. More... | |
int32_t | Pmic_rtcSetFreqComp (Pmic_CoreHandle_t *pPmicCoreHandle, const uint16_t compensation) |
API to Set the RTC frequency compensation value. More... | |
int32_t | Pmic_rtcGetFreqComp (Pmic_CoreHandle_t *pPmicCoreHandle, uint16_t *pCompensation) |
API to Get the RTC frequency compensation value. More... | |
int32_t | Pmic_rtcEnable (Pmic_CoreHandle_t *pPmicCoreHandle, const bool enableRtc) |
API to Enable/Disable the RTC. More... | |
int32_t | Pmic_rtcGetStatus (Pmic_CoreHandle_t *pPmicCoreHandle, bool *pRtcstatus) |
API to read RTC status which defines RTC is started or not. More... | |
int32_t | Pmic_rtcEnableTimerIntr (Pmic_CoreHandle_t *pPmicCoreHandle, const bool enableIntr) |
API to Enable/Disable the RTC Timer Interrupt. More... | |
int32_t | Pmic_rtcEnableAlarmIntr (Pmic_CoreHandle_t *pPmicCoreHandle, const bool enableIntr) |
API to Enable/Disable the RTC Alarm Interrupt. More... | |
int32_t | Pmic_rtcGetRstStatus (Pmic_CoreHandle_t *pPmicCoreHandle, Pmic_RtcRstStatus_t *pRtcRstStatus) |
API to Get the Reset status of RTC. More... | |
int32_t | Pmic_rtcClrRstStatus (Pmic_CoreHandle_t *pPmicCoreHandle, const uint8_t rtcRstStatType) |
API to clear the Reset status of RTC. More... | |
int32_t | Pmic_rtcSetConfiguration (Pmic_CoreHandle_t *pPmicCoreHandle, const Pmic_RtcCfg_t rtcCfg) |
API to Set PMIC RTC Configuration. More... | |
int32_t | Pmic_rtcGetConfiguration (Pmic_CoreHandle_t *pPmicCoreHandle, Pmic_RtcCfg_t *pRtcCfg) |
API to Get PMIC RTC Configuration. More... | |