6 #if defined(ARDUINO_ARCH_STM32) || defined(EPOXY_DUINO)
8 #if defined(EPOXY_DUINO)
9 #include <EpoxyMockSTM32RTC.h>
13 #include "HardwareDateTime.h"
20 STM32RTC& rtc = STM32RTC::getInstance();
21 if (rtc.isTimeSet()) {
22 dateTime->
second = rtc.getSeconds();
23 dateTime->
minute = rtc.getMinutes();
24 dateTime->
hour = rtc.getHours();
26 dateTime->
day = rtc.getDay();
27 dateTime->
month = rtc.getMonth();
28 dateTime->
year = rtc.getYear();
50 STM32RTC& rtc = STM32RTC::getInstance();
56 STM32RTC& rtc = STM32RTC::getInstance();
57 return rtc.isTimeSet();
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.
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