24#ifndef _WATCH_RTC_H_INCLUDED
25#define _WATCH_RTC_H_INCLUDED
29#include "hpl_calendar.h"
42#define WATCH_RTC_REFERENCE_YEAR (2020)
56typedef enum watch_rtc_alarm_match {
57 ALARM_MATCH_DISABLED = 0,
61} watch_rtc_alarm_match;
154void watch_set_date_time(struct calendar_date_time date_time);
160void watch_get_date_time(struct calendar_date_time *date_time);
167void watch_register_tick_callback(ext_irq_cb_t callback);
void watch_rtc_disable_all_periodic_callbacks(void)
Disables all periodic callbacks, including the once-per-second tick callback.
watch_date_time watch_rtc_get_date_time(void)
Returns the date and time.
bool _watch_rtc_is_enabled(void)
Called by main.c to check if the RTC is enabled. You may call this function, but outside of app_init,...
void watch_rtc_disable_periodic_callback(uint8_t frequency)
Disables the tick callback for the given period.
void watch_rtc_disable_tick_callback(void)
Disables the tick callback for the given period.
void watch_rtc_disable_alarm_callback(void)
Disables the alarm callback.
void watch_rtc_register_tick_callback(ext_irq_cb_t callback)
Registers a "tick" callback that will be called once per second.
__attribute__((deprecated("Use watch_rtc_set_date_time function instead"))) void watch_set_date_time(struct calendar_date_time date_time)
Sets the system date and time.
void watch_rtc_register_alarm_callback(ext_irq_cb_t callback, watch_date_time alarm_time, watch_rtc_alarm_match mask)
Registers an alarm callback that will be called when the RTC time matches the target time,...
void watch_rtc_disable_matching_periodic_callbacks(uint8_t mask)
Disables tick callbacks for the given periods (as a bitmask).
void watch_rtc_set_date_time(watch_date_time date_time)
Sets the date and time.
void watch_rtc_register_periodic_callback(ext_irq_cb_t callback, uint8_t frequency)
Registers a callback that will be called at a configurable period.
Definition: watch_rtc.h:44