2021-11-29 02:34:21 -05:00
|
|
|
#ifndef WATCHY_RTC_H
|
|
|
|
#define WATCHY_RTC_H
|
|
|
|
|
2021-12-18 17:05:53 -05:00
|
|
|
#include <Arduino.h>
|
|
|
|
#include <TimeLib.h>
|
|
|
|
#include "AbstractRTC.h"
|
2021-12-18 13:14:15 -05:00
|
|
|
|
2021-11-29 02:34:21 -05:00
|
|
|
class WatchyRTC {
|
|
|
|
public:
|
|
|
|
WatchyRTC();
|
|
|
|
void init();
|
|
|
|
void config(String datetime);
|
|
|
|
void clearAlarm();
|
|
|
|
void read(tmElements_t &tm);
|
|
|
|
void set(tmElements_t tm);
|
|
|
|
uint8_t temperature();
|
2021-12-18 17:05:53 -05:00
|
|
|
int rtcType();
|
2021-11-29 02:34:21 -05:00
|
|
|
private:
|
2021-12-18 13:22:30 -05:00
|
|
|
AbstractRTC* _rtc;
|
2021-11-29 02:34:21 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|