diff --git a/src/RtcDS1302.h b/src/RtcDS1302.h index 3035c49..b55cc95 100644 --- a/src/RtcDS1302.h +++ b/src/RtcDS1302.h @@ -66,6 +66,12 @@ template class RtcDS1302 _wire.begin(); } + + void Begin(int sda, int scl) + { + _wire.begin(sda, scl); + } + bool GetIsWriteProtected() { uint8_t wp = getReg(DS1302_REG_WP); diff --git a/src/RtcDS1307.h b/src/RtcDS1307.h index b2104ba..1933c8c 100644 --- a/src/RtcDS1307.h +++ b/src/RtcDS1307.h @@ -53,6 +53,10 @@ template class RtcDS1307 { _wire.begin(); } + void Begin(int sda, int scl) + { + _wire.begin(sda, scl); + } uint8_t LastError() { diff --git a/src/RtcDS3231.h b/src/RtcDS3231.h index 919ddc8..e1d88c2 100644 --- a/src/RtcDS3231.h +++ b/src/RtcDS3231.h @@ -234,6 +234,11 @@ template class RtcDS3231 _wire.begin(); } + void Begin(int sda, int scl) + { + _wire.begin(sda, scl); + } + uint8_t LastError() { return _lastError; @@ -344,7 +349,7 @@ template class RtcDS3231 } // Temperature is represented as a 10-bit code with a resolution - // of 1/4th °C and is accessable as a signed 16-bit integer at + // of 1/4th °C and is accessable as a signed 16-bit integer at // locations 11h and 12h. // // | r11h | DP | r12h | @@ -354,7 +359,7 @@ template class RtcDS3231 // As it takes (8) right-shifts to register the decimal point (DP) to // the right of the 0th bit, the overall word scaling equals 256. // - // For example, at +/- 25.25°C, concatenated registers = + // For example, at +/- 25.25°C, concatenated registers = // 256 * (+/- 25+(1/4)) = +/- 6464, or 1940h / E6C0h. _wire.requestFrom(DS3231_ADDRESS, DS3231_REG_TEMP_SIZE);