Skip to content

Commit

Permalink
Merge pull request #245 from edgar-bonet/fix-pr244
Browse files Browse the repository at this point in the history
Fix register address and line terminators
  • Loading branch information
caternuson authored Oct 29, 2021
2 parents 27b5be2 + 6ff0aac commit 3349ae1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/RTC_DS1307.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ uint8_t RTC_DS1307::readnvram(uint8_t address) {
/**************************************************************************/
void RTC_DS1307::writenvram(uint8_t address, uint8_t data) {
writenvram(address, &data, 1);
}
}
2 changes: 1 addition & 1 deletion src/RTC_Micros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ DateTime RTC_Micros::now() {
lastMicros += elapsedSeconds * microsPerSecond;
lastUnix += elapsedSeconds;
return lastUnix;
}
}
2 changes: 1 addition & 1 deletion src/RTC_Millis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ DateTime RTC_Millis::now() {
lastMillis += elapsedSeconds * 1000;
lastUnix += elapsedSeconds;
return lastUnix;
}
}
2 changes: 1 addition & 1 deletion src/RTC_PCF8523.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,4 @@ void RTC_PCF8523::deconfigureAllTimers() {
/**************************************************************************/
void RTC_PCF8523::calibrate(Pcf8523OffsetMode mode, int8_t offset) {
write_register(PCF8523_OFFSET, ((uint8_t)offset & 0x7F) | mode);
}
}
2 changes: 1 addition & 1 deletion src/RTC_PCF8563.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void RTC_PCF8563::adjust(const DateTime &dt) {
/**************************************************************************/
DateTime RTC_PCF8563::now() {
uint8_t buffer[7];
buffer[0] = 3;
buffer[0] = PCF8563_VL_SECONDS; // start at location 2, VL_SECONDS
i2c_dev->write_then_read(buffer, 1, buffer, 7);

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

0 comments on commit 3349ae1

Please sign in to comment.