6 #ifndef ACE_TIME_STM32_F1_CLOCK_H
7 #define ACE_TIME_STM32_F1_CLOCK_H
9 #if defined(ARDUINO_ARCH_STM32)
10 #if defined(STM32F1xx)
13 #include "../hw/Stm32F1Rtc.h"
67 class Stm32F1Clock:
public Clock {
69 explicit Stm32F1Clock() {}
75 acetime_t getNow()
const override {
76 return mStm32F1Rtc.getTime();
79 void setNow(acetime_t epochSeconds)
override {
80 if (epochSeconds == kInvalidSeconds)
return;
81 mStm32F1Rtc.setTime(epochSeconds);
85 mutable hw::Stm32F1Rtc mStm32F1Rtc;
91 #endif // #if defined(STM32F1xx)
92 #endif // #if defined(ARDUINO_ARCH_STM32)
94 #endif // #ifndef ACE_TIME_STM32F1_CLOCK_H