mirror of https://github.com/meshcore-dev/MeshCore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
404 B
17 lines
404 B
#pragma once
|
|
|
|
#include <Mesh.h>
|
|
#include <Arduino.h>
|
|
#include <Wire.h>
|
|
|
|
class AutoDiscoverRTCClock : public mesh::RTCClock {
|
|
mesh::RTCClock* _fallback;
|
|
|
|
bool i2c_probe(TwoWire& wire, uint8_t addr);
|
|
public:
|
|
AutoDiscoverRTCClock(mesh::RTCClock& fallback) : _fallback(&fallback) { }
|
|
|
|
void begin(TwoWire& wire);
|
|
uint32_t getCurrentTime() override;
|
|
void setCurrentTime(uint32_t time) override;
|
|
};
|
|
|