Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/RTC_DS3231.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ float RTC_DS3231::getTemperature() {
/**************************************************************************/
bool RTC_DS3231::setAlarm1(const DateTime &dt, Ds3231Alarm1Mode alarm_mode) {
uint8_t ctrl = read_register(DS3231_CONTROL);
if (!(ctrl & 0x04)) {
return false;
}

uint8_t A1M1 = (alarm_mode & 0x01) << 7; // Seconds bit 7.
uint8_t A1M2 = (alarm_mode & 0x02) << 6; // Minutes bit 7.
Expand Down Expand Up @@ -160,9 +157,6 @@ bool RTC_DS3231::setAlarm1(const DateTime &dt, Ds3231Alarm1Mode alarm_mode) {
/**************************************************************************/
bool RTC_DS3231::setAlarm2(const DateTime &dt, Ds3231Alarm2Mode alarm_mode) {
uint8_t ctrl = read_register(DS3231_CONTROL);
if (!(ctrl & 0x04)) {
return false;
}

uint8_t A2M2 = (alarm_mode & 0x01) << 7; // Minutes bit 7.
uint8_t A2M3 = (alarm_mode & 0x02) << 6; // Hour bit 7.
Expand Down
8 changes: 4 additions & 4 deletions src/RTClib.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class RTC_I2C {
@brief RTC based on the DS1307 chip connected via I2C and the Wire library
*/
/**************************************************************************/
class RTC_DS1307 : RTC_I2C {
class RTC_DS1307 : public RTC_I2C {
public:
bool begin(TwoWire *wireInstance = &Wire);
void adjust(const DateTime &dt);
Expand All @@ -367,7 +367,7 @@ class RTC_DS1307 : RTC_I2C {
@brief RTC based on the DS3231 chip connected via I2C and the Wire library
*/
/**************************************************************************/
class RTC_DS3231 : RTC_I2C {
class RTC_DS3231 : public RTC_I2C {
public:
bool begin(TwoWire *wireInstance = &Wire);
void adjust(const DateTime &dt);
Expand Down Expand Up @@ -403,7 +403,7 @@ class RTC_DS3231 : RTC_I2C {
@brief RTC based on the PCF8523 chip connected via I2C and the Wire library
*/
/**************************************************************************/
class RTC_PCF8523 : RTC_I2C {
class RTC_PCF8523 : public RTC_I2C {
public:
bool begin(TwoWire *wireInstance = &Wire);
void adjust(const DateTime &dt);
Expand All @@ -430,7 +430,7 @@ class RTC_PCF8523 : RTC_I2C {
@brief RTC based on the PCF8563 chip connected via I2C and the Wire library
*/
/**************************************************************************/
class RTC_PCF8563 : RTC_I2C {
class RTC_PCF8563 : public RTC_I2C {
public:
bool begin(TwoWire *wireInstance = &Wire);
bool lostPower(void);
Expand Down