54 if (min >= 0 && hour >= 0)
69 if (day >= 0 && month >= 0)
72 tm_.tm_mon = month - 1;
120 immediatePending_ =
true;
void start_stop_logic(bool started)
Perform a bit of logic that is required whenever the clock's running state is changed.
void handle_updates(EventReport *event, bool report)
Handle an incoming time update.
uint16_t rolloverPendingDate_
a day rollover is about to occur
void wakeup()
wakeup the state machine.
uint16_t rolloverPending_
a day rollover is about to occur
uint16_t rolloverPendingYear_
a day rollover is about to occur
uint16_t immediateUpdate_
true if the update should be immediate
int16_t rateRequested_
pending clock rate
struct tm tm_
the time we are last set to as a struct tm
static int event_to_day(uint64_t event)
Get the day from the event.
static int event_to_month(uint64_t event)
Get the month from the event.
static int event_to_min(uint64_t event)
Get the minutes from the event.
static EventType get_event_type(uint16_t suffix)
Get the EventTuype from the event suffix number.
static int16_t event_to_rate(uint64_t event)
Get the rate from the event.
static int event_to_year(uint64_t event)
Get the year from the event.
@ REPORT_TIME
report time event
@ REPORT_YEAR
report year event
@ DATE_ROLLOVER
date rollover event
@ REPORT_RATE
report rate event
@ REPORT_DATE
report date event
static int event_to_hour(uint64_t event)
Get the hour from the event.
Shared notification structure that is assembled for each incoming event-related message,...
EventId event
The event ID from the incoming message.