12 #ifndef __RTC_SFRS_H__
13 #define __RTC_SFRS_H__
15 #define E_RTC_MAX_COUNT 0x0003FFFF
48 #define RTC_SFRS ((__IO RTC_SFRS_t *) (0x50000040))
61 #define RTC_TRIM_SFRS ((__IO RTC_TRIM_SFRS_t *) (0x5001800B))
A structure to represent Special Function Registers for RTC.
Definition: rtc_sfrs.h:20
#define RTC_SFRS
The starting address of RTC SFRS.
Definition: rtc_sfrs.h:48
static __INLINE void f_RTC_Enable(void)
Enable RTC timers.
Definition: rtc_sfrs.h:66
static __INLINE void f_RTC_DisableOverflowIRQ(void)
Disable RTC overflow interrupt.
Definition: rtc_sfrs.h:122
static __INLINE void f_RTC_EnableOverflowIRQ(void)
Enable RTC overflow interrupt.
Definition: rtc_sfrs.h:114
static __INLINE void f_RTC_DisableAlarmIRQ(void)
Disable RTC alarm interrupt.
Definition: rtc_sfrs.h:106
static __INLINE void f_RTC_Lock(void)
Lock RTC configuration mode.
Definition: rtc_sfrs.h:90
static __INLINE uint8_t f_RTC_IsAlarm0(void)
Check if RTC alarm0 detected.
Definition: rtc_sfrs.h:138
static __INLINE void f_RTC_Unlock(void)
Unlock RTC configuration mode.
Definition: rtc_sfrs.h:82
static __INLINE uint32_t f_RTC_GetAlarm1Counter(void)
Read RTC alarm 1 counter.
Definition: rtc_sfrs.h:186
static __INLINE void f_RTC_SetAlarm0Counter(uint32_t val)
Set RTC alarm 0 counter.
Definition: rtc_sfrs.h:178
static __INLINE void f_RTC_EnableAlarmIRQ(void)
Enable RTC alarm interrupt.
Definition: rtc_sfrs.h:98
static __INLINE uint32_t f_RTC_GetAlarm0Counter(void)
Read RTC alarm 0 counter.
Definition: rtc_sfrs.h:170
static __INLINE void f_RTC_SetAlarm1Counter(uint32_t val)
Set RTC alarm 1 counter.
Definition: rtc_sfrs.h:194
static __INLINE void f_RTC_SetRTCTrim(uint8_t val)
Set RTC trim setting.
Definition: rtc_sfrs.h:202
static __INLINE uint8_t f_RTC_IsAlarm1(void)
Check if RTC alarm1 detected.
Definition: rtc_sfrs.h:146
static __INLINE void f_RTC_SetCurrentCounter(uint32_t val)
Set RTC current counter.
Definition: rtc_sfrs.h:162
#define RTC_TRIM_SFRS
The starting address of RTC TRIM SFRS.
Definition: rtc_sfrs.h:61
static __INLINE uint32_t f_RTC_GetCurrentCounter(void)
Read RTC current counter.
Definition: rtc_sfrs.h:154
A structure to represent Special Function Registers for RTC trim.
Definition: rtc_sfrs.h:53
static __INLINE void f_RTC_Disable(void)
Disable RTC timers.
Definition: rtc_sfrs.h:74
static __INLINE uint8_t f_RTC_IsOverflow(void)
Check if RTC overflow occured.
Definition: rtc_sfrs.h:130