Skip to content

Commit 3349ae1

Browse files
authored
Merge pull request #245 from edgar-bonet/fix-pr244
Fix register address and line terminators
2 parents 27b5be2 + 6ff0aac commit 3349ae1

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/RTC_DS1307.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ uint8_t RTC_DS1307::readnvram(uint8_t address) {
131131
/**************************************************************************/
132132
void RTC_DS1307::writenvram(uint8_t address, uint8_t data) {
133133
writenvram(address, &data, 1);
134-
}
134+
}

src/RTC_Micros.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ DateTime RTC_Micros::now() {
3030
lastMicros += elapsedSeconds * microsPerSecond;
3131
lastUnix += elapsedSeconds;
3232
return lastUnix;
33-
}
33+
}

src/RTC_Millis.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ DateTime RTC_Millis::now() {
2424
lastMillis += elapsedSeconds * 1000;
2525
lastUnix += elapsedSeconds;
2626
return lastUnix;
27-
}
27+
}

src/RTC_PCF8523.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,4 @@ void RTC_PCF8523::deconfigureAllTimers() {
289289
/**************************************************************************/
290290
void RTC_PCF8523::calibrate(Pcf8523OffsetMode mode, int8_t offset) {
291291
write_register(PCF8523_OFFSET, ((uint8_t)offset & 0x7F) | mode);
292-
}
292+
}

src/RTC_PCF8563.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void RTC_PCF8563::adjust(const DateTime &dt) {
6161
/**************************************************************************/
6262
DateTime RTC_PCF8563::now() {
6363
uint8_t buffer[7];
64-
buffer[0] = 3;
64+
buffer[0] = PCF8563_VL_SECONDS; // start at location 2, VL_SECONDS
6565
i2c_dev->write_then_read(buffer, 1, buffer, 7);
6666

6767
return DateTime(bcd2bin(buffer[6]) + 2000U, bcd2bin(buffer[5] & 0x1F),

0 commit comments

Comments
 (0)