6 #if defined(ARDUINO_ARCH_STM32) || defined(EPOXY_DUINO)
9 #if ! defined(EPOXY_DUINO)
12 #include "HardwareDateTime.h"
19 #if defined(EPOXY_DUINO)
29 STM32RTC& rtc = STM32RTC::getInstance();
30 if (rtc.isTimeSet()) {
31 dateTime->
second = rtc.getSeconds();
32 dateTime->
minute = rtc.getMinutes();
33 dateTime->
hour = rtc.getHours();
35 dateTime->
day = rtc.getDay();
36 dateTime->
month = rtc.getMonth();
37 dateTime->
year = rtc.getYear();
60 #if defined(EPOXY_DUINO)
63 STM32RTC& rtc = STM32RTC::getInstance();
70 #if defined(EPOXY_DUINO)
73 STM32RTC& rtc = STM32RTC::getInstance();
74 return rtc.isTimeSet();
The date (year, month, day) and time (hour, minute, second) fields supported by the DS3231 RTC chip.
uint8_t year
[00, 99], year - 2000
uint8_t dayOfWeek
[1, 7], interpretation undefined, increments every day
void setDateTime(const HardwareDateTime &dateTime) const
Set the STM with the HardwareDateTime values.
bool isTimeSet() const
Return true if the RTC is available and the time is set.
void readDateTime(HardwareDateTime *dateTime) const
Read the time into the HardwareDateTime object.