RTC fix time lag correction

This commit is contained in:
Emanuele Trabattoni
2025-08-03 11:27:07 +02:00
parent b19ed89158
commit a1a66ebf8e
4 changed files with 23 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ namespace drivers
} datetime_t;
public:
PCF85063(I2C &i2c, const uint8_t address, const uint8_t ctrl1 = RTC_CTRL_1_DEFAULT, const uint8_t ctrl2 = RTC_CTRL_2_DEFAULT);
PCF85063(I2C &i2c, const uint8_t address = PCF85063_ADDRESS, const uint8_t ctrl1 = RTC_CTRL_1_DEFAULT, const uint8_t ctrl2 = RTC_CTRL_2_DEFAULT);
const bool reset(void);
@@ -100,6 +100,9 @@ namespace drivers
const bool readAlarm(datetime_t &time);
const bool getAlarmFlag(uint8_t &flags);
const bool setOffset(const uint8_t ofst);
const uint8_t getOffset();
const std::string getTimeStr();
static const std::string datetime2str(const datetime_t &datetime);