File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
STM32F1/libraries/RTClock/src Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 8181*/
8282
8383 void RTClock::setTime (time_t time_stamp) {
84- breakTime (time_stamp, tmm); // time will be broken to tm
85- setTime (tmm);
84+ breakTime (time_stamp, tmm); // time will be broken to tmm
85+ setTime (tmm);
8686 // rtc_set_count(time_stamp);
8787 }
8888
89- #define LEAP_YEAR (Y ) ( ((1970 +Y)>0 ) && !((1970 +Y)%4 ) && ( ((1970 +Y)%100 ) || !((1970 +Y)%400 ) ) )
89+ void RTClock::setTime (time_t time_stamp) {
90+ rtc_set_count (time_stamp);
91+ }
92+
93+ #define LEAP_YEAR (Y ) ( ((1970 +Y)>0 ) && !((1970 +Y)%4 ) && ( ((1970 +Y)%100 ) || !((1970 +Y)%400 ) ) )
9094
9195 // -----------------------------------------------------------------------------
9296void RTClock::breakTime (time_t timeInput, tm_t & tmm)
You can’t perform that action at this time.
0 commit comments