RTC Driver OK

This commit is contained in:
Emanuele Trabattoni
2025-07-10 17:11:21 +02:00
parent 8f701ce81a
commit 7fd4a284af
4 changed files with 34 additions and 7 deletions

View File

@@ -100,6 +100,7 @@ namespace drivers
I2C &m_i2c;
uint8_t m_address;
public:
typedef struct
{
uint16_t year;
@@ -129,6 +130,8 @@ namespace drivers
const bool readAlarm(datetime_t &time);
const bool getAlarmFlag(uint8_t &flags);
const std::string getTimeStr();
private:
const std::string datetime2str(datetime_t &datetime);
const uint8_t decToBcd(const int val);