6 #ifndef ACE_TIME_STM32_F1_CLOCK_H
7 #define ACE_TIME_STM32_F1_CLOCK_H
10 #if defined(STM32F1xx) || defined(EPOXY_DUINO)
13 #if ! defined(EPOXY_DUINO)
14 #include "../hw/Stm32F1Rtc.h"
83 #if ! defined(EPOXY_DUINO)
89 #if defined(EPOXY_DUINO)
92 return mStm32F1Rtc.getTime();
96 void setNow(acetime_t epochSeconds)
override {
98 #if defined(EPOXY_DUINO)
99 mEpochSeconds = epochSeconds;
101 mStm32F1Rtc.setTime(epochSeconds);
106 #if defined(EPOXY_DUINO)
107 uint32_t mEpochSeconds;
109 mutable hw::Stm32F1Rtc mStm32F1Rtc;
Abstract base class for objects that provide and store time.
static const acetime_t kInvalidSeconds
Error value returned by getNow() and other methods when this object is not yet initialized.
An implementation of Clock that is specialized for the LSE_CLOCK (Low Speed External clock) on the ST...
void setup()
Configure the clock.
acetime_t getNow() const override
Return the number of seconds since the AceTime epoch (2000-01-01T00:00:00Z).
void setNow(acetime_t epochSeconds) override
Set the time to the indicated seconds.