Not really an issues, more of a request. I think it would be handy if we could access the underlying RTC to keep track of the time that has elapsed between e.g. two pin-interrupt wake's.
I propose two methods to achieve this:
void ArduinoLowPowerClass::setRtcTime(uint32_t time){
// not sure if this is the best way to make sure the RTC is up and running
if (!rtc.isConfigured()) {
attachInterruptWakeup(RTC_ALARM_WAKEUP, NULL, 0);
}
rtc.setEpoch(time);
}
uint32_t ArduinoLowPowerClass::getRtcTime(void){
return rtc.getEpoch();
}
I have tested this on SAMD and it seems to be working.
Not really an issues, more of a request. I think it would be handy if we could access the underlying RTC to keep track of the time that has elapsed between e.g. two pin-interrupt wake's.
I propose two methods to achieve this:
I have tested this on SAMD and it seems to be working.