35#include "../SensorBuildOpt.h"
36#if !SENSORLIB_EXCLUDE_RTC
87 bool begin(TwoWire &wire,
int sda = -1,
int scl = -1);
89#elif defined(ESP_PLATFORM)
91#if defined(SENSORLIB_USE_I2C_LEGACY)
103 bool begin(i2c_port_t port_num,
int sda,
int scl);
115 bool begin(i2c_master_bus_handle_t handle);
173 using DriverCreator = std::unique_ptr<SensorRTC> (*)();
180 static constexpr uint8_t driverCreatorMaxNum =
RtcDrv_PCF8563 + 1;
188 static DriverCreator driverCreators[driverCreatorMaxNum];
204 std::unique_ptr<SensorRTC> _drv;
bool(*)(uint8_t addr, uint8_t reg, uint8_t *buf, size_t len, bool writeReg, bool isWrite) CustomCallback
virtual void setDateTime(RTC_DateTime datetime)=0
Set the date and time of the RTC using an RTC_DateTime object.
virtual RTC_DateTime getDateTime()=0
Get the current date and time from the RTC.
const char * getChipName()
Get the name of the RTC chip.
void setDateTime(RTC_DateTime datetime)
Set the date and time on the RTC device.
RTC_DateTime getDateTime()
Get the current date and time from the RTC device.
bool begin(SensorCommCustom::CustomCallback callback)
Initialize the RTC driver using a custom callback.
void setRtcDrvModel(SensorRTCType model)
Set the model of the RTC (real-time clock) driver.
SensorRTCType
Enumeration of different RTC (Real-Time Clock) driver types.