File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
- /* Copyright (c) 2020-2021 , Collab
1
+ /* Copyright (c) 2020-2023 , Collab
2
2
* All rights reserved
3
3
*/
4
4
/*
8
8
#include " SystemClock.h"
9
9
10
10
SystemClock::SystemClock (
11
- int scl_pin,
12
- int sda_pin,
11
+ TwoWire* wire,
13
12
char *ntp_server,
14
13
long int gmtOffset_sec,
15
14
int daylightOffset_sec)
@@ -18,11 +17,11 @@ SystemClock::SystemClock(
18
17
_gmtOffset_sec = gmtOffset_sec;
19
18
_daylightOffset_sec = daylightOffset_sec;
20
19
21
- _clock = new DS3231_RealtimeClock (scl_pin, sda_pin );
20
+ _clock = new DS3231_RealtimeClock (wire );
22
21
}
23
22
24
23
void SystemClock::begin () {
25
- _clock->begin (false );
24
+ _clock->begin ();
26
25
27
26
startupTime = _clock->startupTime ;
28
27
}
Original file line number Diff line number Diff line change 1
- /* Copyright (c) 2020-2021 , Collab
1
+ /* Copyright (c) 2020-2023 , Collab
2
2
* All rights reserved
3
3
*/
4
4
/*
@@ -15,8 +15,7 @@ class SystemClock
15
15
{
16
16
public:
17
17
SystemClock (
18
- int scl_pin,
19
- int sda_pin,
18
+ TwoWire* wire,
20
19
char *ntpServer = " pool.ntp.org" ,
21
20
long int gmtOffset_sec = 3600 ,
22
21
int daylightOffset_sec = 3600
You can’t perform that action at this time.
0 commit comments