Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 36e46b0

Browse files
authoredAug 7, 2024··
Update RTC.cpp
Rollback - keeping domain qualifiers for now.
1 parent e134df5 commit 36e46b0

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed
 

‎libraries/RTC/src/RTC.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,12 @@ bool setRtcAlarm(rtc_alarm_time_t alarm_time) {
605605
return false;
606606
}
607607

608-
RTClock() : is_initialized{false} {
608+
RTClock::RTClock() : is_initialized{false} {
609609
}
610610

611-
~RTClock() { }
611+
RTClock::~RTClock() { }
612612

613-
bool begin() {
613+
bool RTClock::begin() {
614614
if(openRtc()) {
615615
is_initialized = true;
616616
}
@@ -620,7 +620,7 @@ bool begin() {
620620
return is_initialized;
621621
}
622622

623-
bool getTime(RTCTime &t) {
623+
bool RTClock::getTime(RTCTime &t) {
624624
struct tm present;
625625
if(is_initialized) {
626626
if( getRtcTime(present) ) {
@@ -631,7 +631,7 @@ bool getTime(RTCTime &t) {
631631
return false;
632632
}
633633

634-
bool setPeriodicCallback(rtc_cbk_t fnc, Period p) {
634+
bool RTClock::setPeriodicCallback(rtc_cbk_t fnc, Period p) {
635635

636636
RTCIrqCfg_t rtc_irq_cfg;
637637

@@ -649,7 +649,7 @@ bool setPeriodicCallback(rtc_cbk_t fnc, Period p) {
649649
return false;
650650
}
651651

652-
bool setAlarmCallback(rtc_cbk_t fnc, RTCTime &t, AlarmMatch &m) {
652+
bool RTClock::setAlarmCallback(rtc_cbk_t fnc, RTCTime &t, AlarmMatch &m) {
653653

654654
RTCIrqCfg_t rtc_irq_cfg;
655655
rtc_irq_cfg.req = RTC_ALARM;
@@ -693,15 +693,15 @@ bool setAlarmCallback(rtc_cbk_t fnc, RTCTime &t, AlarmMatch &m) {
693693
return false;
694694
}
695695

696-
bool setAlarm(RTCTime &t, AlarmMatch &m) {
696+
bool RTClock::setAlarm(RTCTime &t, AlarmMatch &m) {
697697
return this->setAlarmCallback(nullptr, t, m);
698698
}
699699

700-
bool isRunning() {
700+
bool RTClock::isRunning() {
701701
return isRtcRunning();
702702
}
703703

704-
bool setTime(RTCTime &t) {
704+
bool RTClock::setTime(RTCTime &t) {
705705
if(is_initialized) {
706706
if(setRtcTime((rtc_time_t)t.getTmTime())) {
707707
return true;
@@ -710,7 +710,7 @@ bool setTime(RTCTime &t) {
710710
return false;
711711
}
712712

713-
bool setTimeIfNotRunning(RTCTime &t) {
713+
bool RTClock::setTimeIfNotRunning(RTCTime &t) {
714714
if(!isRunning()) {
715715
return setTime(t);
716716
}
@@ -721,4 +721,3 @@ bool setTimeIfNotRunning(RTCTime &t) {
721721
RTClock RTC;
722722
#endif
723723

724-

0 commit comments

Comments
 (0)
Please sign in to comment.