arduino-libraries/ArduinoLowPower

Allow access to RTC

Closed this issue · 1 comments

This is a great library. Not really an issue, more of a feature request.

Is it possible to add time-keeping via the RTC?

For example:

void 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 getRtcTime(void){
	return rtc.getEpoch();
}

This appears to be a duplicate of #23.