Remove readreq when changing continuous

This commit is contained in:
Scott Shawcroft 2020-10-13 10:15:34 -07:00
parent 379e73af2e
commit 2bc40bcadf
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
1 changed files with 1 additions and 2 deletions

View File

@ -98,8 +98,7 @@ volatile bool hold_interrupt = false;
#ifdef SAMD21 #ifdef SAMD21
static void rtc_set_continuous(bool continuous) { static void rtc_set_continuous(bool continuous) {
while (RTC->MODE0.STATUS.bit.SYNCBUSY); while (RTC->MODE0.STATUS.bit.SYNCBUSY);
// TODO: DaveP: Do we need the RREQ here? RTC->MODE0.READREQ.reg = (continuous ? RTC_READREQ_RCONT : 0) | 0x0010;
RTC->MODE0.READREQ.reg = RTC_READREQ_RREQ | (continuous ? RTC_READREQ_RCONT : 0) | 0x0010;
while (RTC->MODE0.STATUS.bit.SYNCBUSY); while (RTC->MODE0.STATUS.bit.SYNCBUSY);
} }