39#ifndef LIBOPENCM3_RTC_H
40#define LIBOPENCM3_RTC_H
49#define RTC_CRH MMIO32(RTC_BASE + 0x00)
52#define RTC_CRL MMIO32(RTC_BASE + 0x04)
55#define RTC_PRLH MMIO32(RTC_BASE + 0x08)
56#define RTC_PRLL MMIO32(RTC_BASE + 0x0c)
59#define RTC_DIVH MMIO32(RTC_BASE + 0x10)
60#define RTC_DIVL MMIO32(RTC_BASE + 0x14)
63#define RTC_CNTH MMIO32(RTC_BASE + 0x18)
64#define RTC_CNTL MMIO32(RTC_BASE + 0x1c)
67#define RTC_ALRH MMIO32(RTC_BASE + 0x20)
68#define RTC_ALRL MMIO32(RTC_BASE + 0x24)
75#define RTC_CRH_OWIE (1 << 2)
78#define RTC_CRH_ALRIE (1 << 1)
81#define RTC_CRH_SECIE (1 << 0)
88#define RTC_CRL_RTOFF (1 << 5)
91#define RTC_CRL_CNF (1 << 4)
94#define RTC_CRL_RSF (1 << 3)
97#define RTC_CRL_OWF (1 << 2)
100#define RTC_CRL_ALRF (1 << 1)
103#define RTC_CRL_SECF (1 << 0)
uint32_t rtc_get_counter_val(void)
RTC return the Counter Value.
void rtc_awake_from_standby(void)
RTC Start RTC after Standby Mode.
void rtc_set_prescale_val(uint32_t prescale_val)
RTC Set the prescaler Value.
void rtc_clear_flag(rtcflag_t flag_val)
RTC Clear an Interrupt Flag.
void rtc_set_alarm_time(uint32_t alarm_time)
RTC Set the Alarm Time.
void rtc_interrupt_disable(rtcflag_t flag_val)
RTC Disable Interrupt.
void rtc_disable_alarm(void)
RTC Disable the Alarm.
void rtc_auto_awake(enum rcc_osc clock_source, uint32_t prescale_val)
RTC Configuration on Wakeup.
uint32_t rtc_get_alarm_val(void)
RTC return the Alarm Value.
rtcflag_t
RTC Interrupt Flags.
uint32_t rtc_check_flag(rtcflag_t flag_val)
RTC Return a Flag Setting.
void rtc_exit_config_mode(void)
RTC Leave Configuration Mode.
void rtc_awake_from_off(enum rcc_osc clock_source)
RTC Set Operational from the Off state.
void rtc_interrupt_enable(rtcflag_t flag_val)
RTC Enable Interrupt.
void rtc_enable_alarm(void)
RTC Enable the Alarm.
uint32_t rtc_get_prescale_div_val(void)
RTC return the prescaler Value.
void rtc_set_counter_val(uint32_t counter_val)
RTC set the Counter.
void rtc_enter_config_mode(void)
RTC Enter Configuration Mode.
@ RTC_ALR
Alarm Event Flag.
@ RTC_SEC
Counter Second Flag.
@ RTC_OW
Counter Overflow Flag.