RTC Driver API/interface file.
Go to the source code of this file.
Data Structures | |
| struct | RTC_HwAttrs |
| RTC Hardware attributes. More... | |
| struct | RTC_Params |
| RTC Parameters. More... | |
| struct | RTC_Object |
| RTC driver object. More... | |
| struct | RTC_Config |
| RTC Global Configuration. More... | |
| struct | RTC_Time |
| RTC Time Structure. More... | |
Macros | |
| #define | OSCILLATOR_FREQ_HZ ((uint32_t) 32768U) |
| 32.768 kHz Crystal Oscillator Frequency More... | |
| #define | RTC_FREEZE_MODE ((uint32_t) 0x02000000U) |
| Enable Freeze Mode. More... | |
| #define | O32K_OSC_DEP_EN_MASK (CSL_RTC_GENRAL_CTL_O32K_OSC_DEP_EN_MASK) |
| O32K_OSC_DEP_EN_MASK. More... | |
| #define | RD_PEND_MASK (CSL_RTC_SYNCPEND_RD_PEND_MASK) |
| Read Pend Status. More... | |
| #define | WR_PEND_MASK (CSL_RTC_SYNCPEND_WR_PEND_MASK) |
| Write Pend Status. More... | |
| #define | O32K_CLK_OBS_BIT_MASK (CSL_RTC_SYNCPEND_O32K_CLK_OBS_MASK) |
| O32K_CLK_OBS_BIT_MASK. More... | |
| #define | RTC_SW_OFF_MASK (CSL_RTC_GENRAL_CTL_SW_OFF_MASK) |
| RTC_SW_OFF_MASK. More... | |
| #define | RTC_UNLOCK_MASK (CSL_RTC_GENRAL_CTL_UNLOCK_MASK) |
| Unlock State Status. More... | |
| #define | OSC_LOCK_WAIT (3U) |
| Wait time for stabalizing OSC. More... | |
| #define | KICK0_UNLOCK_VALUE (uint32_t)0x83E70B13U |
| RTC Kick unlock values. More... | |
| #define | KICK1_UNLOCK_VALUE (uint32_t)0x95A4F1E0U |
| #define | KICK0_LOCK_VALUE (CSL_RTC_KICK0_RESETVAL) |
| RTC Kick lock values. More... | |
| #define | KICK1_LOCK_VALUE (CSL_RTC_KICK1_RESETVAL) |
| #define | RTC_BASEADDR (uint32_t)0x2B1F0000U |
| RTC Base Address. More... | |
RTC Timer Interrupt Set/Indication Flags | |
| #define | RTC_TMR_INT_INT0_STATUS_FLAG (CSL_RTC_IRQSTATUS_SYS_EVENT_ON_OFF_MASK) |
| ON_OFF status interrupt. More... | |
| #define | RTC_TMR_INT_INT1_STATUS_FLAG (CSL_RTC_IRQSTATUS_SYS_EVENT_OFF_ON_MASK) |
| OFF_ON status interrupt. More... | |
| #define | RTC_TMR_INT_INT0_CLEAR_FLAG (CSL_RTC_IRQENABLE_CLR_SYS_EN_EVENT_ON_OFF_MASK) |
| ON_OFF clear interrupt. More... | |
| #define | RTC_TMR_INT_INT1_CLEAR_FLAG (CSL_RTC_IRQENABLE_CLR_SYS_EN_EVENT_OFF_ON_MASK) |
| OFF_ON clear interrupt. More... | |
| #define | RTC_TMR_INT_INT0_SET_FLAG (CSL_RTC_IRQENABLE_SET_SYS_EN_EVENT_ON_OFF_MASK) |
| ON_OFF set interrupt. More... | |
| #define | RTC_TMR_INT_INT1_SET_FLAG (CSL_RTC_IRQENABLE_SET_SYS_EN_EVENT_OFF_ON_MASK) |
| OFF_ON set interrupt. More... | |
| #define | RTC_TMR_INT_INT0_RAW_STATUS_FLAG (CSL_RTC_IRQSTATUS_RAW_SYS_EVENT_ON_OFF_MASK) |
| ON_OFF raw status interrupt. More... | |
| #define | RTC_TMR_INT_INT1_RAW_STATUS_FLAG (CSL_RTC_IRQSTATUS_RAW_SYS_EVENT_OFF_ON_MASK) |
| OFF_ON raw status interrupt. More... | |
| #define | RTC_TMR_INT_STATUS_ALL |
| All interrupt status mask. More... | |
| #define | RTC_TMR_INT_CLEAR_ALL |
| All interrupt clear mask. More... | |
| #define | RTC_TMR_INT_REQ_ALL |
| All interrupt set mask. More... | |
| #define | RTC_TMR_INT_RAW_STATUS_ALL |
| All interrupt raw status mask. More... | |
Typedefs | |
| typedef struct RTC_Config_s * | RTC_Handle |
| A handle that is returned from a RTC_open() call. More... | |
| typedef void(* | RTC_OnOffCallbackFxn) (RTC_Handle handle) |
| The definition of a ON_OFF callback function used by the RTC driver. More... | |
| typedef void(* | RTC_OffOnCallbackFxn) (RTC_Handle handle) |
| The definition of a OFF_ON callback function used by the RTC driver. More... | |
Functions | |
| void | RTC_init (void) |
| Initialize the RTC module. More... | |
| void | RTC_deinit (void) |
| De-initialize the RTC module. More... | |
| void | RTC_paramsInit (RTC_Params *params) |
| Function to set default values of RTC_Params in params. More... | |
| RTC_Handle | RTC_open (uint32_t idx, const RTC_Params *params) |
| Open the RTC at index idx with parameters params. More... | |
| void | RTC_close (RTC_Handle handle) |
| Function to close the RTC Peripheral specified by the handle. More... | |
| int32_t | RTC_setTime (RTC_Handle handle, const RTC_Time *rtc_time) |
| Set the RTC time. More... | |
| int32_t | RTC_getTime (RTC_Handle handle, RTC_Time *rtc_time) |
| Get the current RTC time. More... | |
| int32_t | RTC_setOff_OnTimerEvent (RTC_Handle handle, const RTC_Time *rtc_time) |
| Set the off-on timer event / Use as timer 1 for RTC. More... | |
| int32_t | RTC_setOn_OffTimerEvent (RTC_Handle handle, const RTC_Time *rtc_time) |
| Set the on-off timer event / Use as timer 2 for RTC. More... | |
| uint32_t | RTC_readScratchRegister (RTC_Handle handle, uint32_t scratchIndex) |
| Read a value from a specific RTC scratch register. More... | |
| int32_t | RTC_writeScratchRegister (RTC_Handle handle, uint32_t scratchIndex, uint32_t value) |
| Write a value to a specific RTC scratch register. More... | |
| RTC_Time | RTC_calculateElapsedTime (const RTC_Time *startTime, const RTC_Time *endTime) |
| Calculate Elapsed Time. More... | |
| int32_t | RTC_adjustForDrift (RTC_Handle handle, Float32 measuredDriftInSeconds) |
| Calculate Elapsed Time. More... | |
| int32_t | RTC_stop (RTC_Handle handle) |
| Stop the RTC. More... | |
| int32_t | RTC_start (RTC_Handle handle) |
| Start the RTC after it's stopped. More... | |
| void | RTC_erratumi2327Init (void) |
| RTC Erratum i2327 Workaround. More... | |