37 #ifndef RTC_H_INCLUDED 38 #define RTC_H_INCLUDED 56 uint32_t *pul_second);
60 uint32_t ul_hour_flag, uint32_t ul_hour,
61 uint32_t ul_minute_flag, uint32_t ul_minute,
62 uint32_t ul_second_flag, uint32_t ul_second);
64 uint32_t *pul_day, uint32_t *pul_week);
66 uint32_t ul_day, uint32_t ul_week);
68 uint32_t ul_month_flag, uint32_t ul_month,
69 uint32_t ul_day_flag, uint32_t ul_day);
78 #if ((SAM3S8) || (SAM3SD8) || (SAM4S) || (SAM4N) || (SAM4C) || (SAMG) || (SAM4CP) || (SAM4CM) || defined(__DOXYGEN__)) 79 void rtc_set_calendar_mode(
Rtc *p_rtc, uint32_t ul_mode);
80 uint32_t rtc_get_calendar_mode(
Rtc *p_rtc);
81 void rtc_set_calibration(
Rtc *p_rtc, uint32_t ul_direction_ppm,
82 uint32_t ul_correction, uint32_t ul_range_ppm);
85 #if ((SAM3S8) || (SAM3SD8) || (SAM4S) || (SAM4C) || (SAMG) || (SAM4CP) || (SAM4CM) || SAMV71 || SAMV70 || SAME70 || SAMS70 || defined(__DOXYGEN__)) 86 void rtc_set_waveform(
Rtc *p_rtc, uint32_t ul_channel, uint32_t ul_value);
87 #if ((SAM3S8) || (SAM3SD8) || (SAM4S) || (SAM4C)|| (SAM4CP) || (SAM4CM) || SAMV71 || SAMV70 || SAME70 || SAMS70 || defined(__DOXYGEN__)) 88 void rtc_set_pulse_parameter(
Rtc *p_rtc, uint32_t ul_time_high,
93 #if ((SAM3N) || (SAM3U) || (SAM3XA) || defined(__DOXYGEN__)) 94 void rtc_set_writeprotect(
Rtc *p_rtc, uint32_t ul_enable);
97 #if ((SAM4C) || (SAM4CP) || (SAM4CM) || defined(__DOXYGEN__)) 98 void rtc_get_tamper_time(
Rtc *p_rtc, uint32_t *pul_hour, uint32_t *pul_minute,
99 uint32_t *pul_second, uint8_t reg_num);
100 void rtc_get_tamper_date(
Rtc *p_rtc, uint32_t *pul_year, uint32_t *pul_month,
101 uint32_t *pul_day, uint32_t *pul_week, uint8_t reg_num);
102 uint32_t rtc_get_tamper_source(
Rtc *p_rtc, uint8_t reg_num);
103 uint32_t rtc_get_tamper_event_counter(
Rtc *p_rtc);
104 bool rtc_is_tamper_occur_in_backup_mode(
Rtc *p_rtc, uint8_t reg_num);
107 #if (SAMG55 || defined(__DOXYGEN__)) 108 uint32_t rtc_get_milliseconds(
Rtc *p_rtc);
uint32_t rtc_set_time(Rtc *p_rtc, uint32_t ul_hour, uint32_t ul_minute, uint32_t ul_second)
Set the RTC time value.
void rtc_enable_interrupt(Rtc *p_rtc, uint32_t ul_sources)
Enable RTC interrupts.
uint32_t rtc_get_hour_mode(Rtc *p_rtc)
Get the RTC hour mode.
void rtc_get_time(Rtc *p_rtc, uint32_t *pul_hour, uint32_t *pul_minute, uint32_t *pul_second)
Get the RTC time value.
uint32_t rtc_get_status(Rtc *p_rtc)
Get the RTC status.
void rtc_clear_time_alarm(Rtc *p_rtc)
Clear the RTC time alarm setting.
void rtc_clear_date_alarm(Rtc *p_rtc)
Clear the RTC date alarm setting.
void rtc_set_calendar_event(Rtc *p_rtc, uint32_t ul_selection)
Set the RTC calendar event selection.
uint32_t rtc_set_time_alarm(Rtc *p_rtc, uint32_t ul_hour_flag, uint32_t ul_hour, uint32_t ul_minute_flag, uint32_t ul_minute, uint32_t ul_second_flag, uint32_t ul_second)
Set the RTC alarm time value.
Commonly used includes, types and macros.
uint32_t rtc_set_date(Rtc *p_rtc, uint32_t ul_year, uint32_t ul_month, uint32_t ul_day, uint32_t ul_week)
Set the RTC date.
uint32_t rtc_set_date_alarm(Rtc *p_rtc, uint32_t ul_month_flag, uint32_t ul_month, uint32_t ul_day_flag, uint32_t ul_day)
Set the RTC alarm date value.
void rtc_set_time_event(Rtc *p_rtc, uint32_t ul_selection)
Set the RTC time event selection.
void rtc_disable_interrupt(Rtc *p_rtc, uint32_t ul_sources)
Disable RTC interrupts.
void rtc_get_date(Rtc *p_rtc, uint32_t *pul_year, uint32_t *pul_month, uint32_t *pul_day, uint32_t *pul_week)
Get the RTC date value.
void rtc_set_hour_mode(Rtc *p_rtc, uint32_t ul_mode)
Set the RTC hour mode.
uint32_t rtc_get_interrupt_mask(Rtc *p_rtc)
Read RTC interrupt mask.
uint32_t rtc_get_valid_entry(Rtc *p_rtc)
Get the RTC valid entry.
void rtc_clear_status(Rtc *p_rtc, uint32_t ul_clear)
Set the RTC SCCR to clear status bits.