Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace boolean type by bool #259

Merged
merged 1 commit into from
May 14, 2022
Merged
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
2 changes: 1 addition & 1 deletion src/RTC_DS1307.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@return True if Wire can find DS1307 or false otherwise.
*/
/**************************************************************************/
boolean RTC_DS1307::begin(TwoWire *wireInstance) {
bool RTC_DS1307::begin(TwoWire *wireInstance) {
if (i2c_dev)
delete i2c_dev;
i2c_dev = new Adafruit_I2CDevice(DS1307_ADDRESS, wireInstance);
Expand Down
2 changes: 1 addition & 1 deletion src/RTC_DS3231.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@return True if Wire can find DS3231 or false otherwise.
*/
/**************************************************************************/
boolean RTC_DS3231::begin(TwoWire *wireInstance) {
bool RTC_DS3231::begin(TwoWire *wireInstance) {
if (i2c_dev)
delete i2c_dev;
i2c_dev = new Adafruit_I2CDevice(DS3231_ADDRESS, wireInstance);
Expand Down
6 changes: 3 additions & 3 deletions src/RTC_PCF8523.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@return True if Wire can find PCF8523 or false otherwise.
*/
/**************************************************************************/
boolean RTC_PCF8523::begin(TwoWire *wireInstance) {
bool RTC_PCF8523::begin(TwoWire *wireInstance) {
if (i2c_dev)
delete i2c_dev;
i2c_dev = new Adafruit_I2CDevice(PCF8523_ADDRESS, wireInstance);
Expand All @@ -37,7 +37,7 @@ boolean RTC_PCF8523::begin(TwoWire *wireInstance) {
after the bit is cleared, for instance with adjust()
*/
/**************************************************************************/
boolean RTC_PCF8523::lostPower(void) {
bool RTC_PCF8523::lostPower(void) {
return read_register(PCF8523_STATUSREG) >> 7;
}

Expand All @@ -48,7 +48,7 @@ boolean RTC_PCF8523::lostPower(void) {
@return True if the PCF8523 has been set up, false if not
*/
/**************************************************************************/
boolean RTC_PCF8523::initialized(void) {
bool RTC_PCF8523::initialized(void) {
return (read_register(PCF8523_CONTROL_3) & 0xE0) != 0xE0;
}

Expand Down
4 changes: 2 additions & 2 deletions src/RTC_PCF8563.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@return True if Wire can find PCF8563 or false otherwise.
*/
/**************************************************************************/
boolean RTC_PCF8563::begin(TwoWire *wireInstance) {
bool RTC_PCF8563::begin(TwoWire *wireInstance) {
if (i2c_dev)
delete i2c_dev;
i2c_dev = new Adafruit_I2CDevice(PCF8563_ADDRESS, wireInstance);
Expand All @@ -34,7 +34,7 @@ boolean RTC_PCF8563::begin(TwoWire *wireInstance) {
cleared using adjust()
*/
/**************************************************************************/
boolean RTC_PCF8563::lostPower(void) {
bool RTC_PCF8563::lostPower(void) {
return read_register(PCF8563_VL_SECONDS) >> 7;
}

Expand Down
14 changes: 7 additions & 7 deletions src/RTClib.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class RTC_I2C {
/**************************************************************************/
class RTC_DS1307 : RTC_I2C {
public:
boolean begin(TwoWire *wireInstance = &Wire);
bool begin(TwoWire *wireInstance = &Wire);
void adjust(const DateTime &dt);
uint8_t isrunning(void);
DateTime now();
Expand All @@ -369,7 +369,7 @@ class RTC_DS1307 : RTC_I2C {
/**************************************************************************/
class RTC_DS3231 : RTC_I2C {
public:
boolean begin(TwoWire *wireInstance = &Wire);
bool begin(TwoWire *wireInstance = &Wire);
void adjust(const DateTime &dt);
bool lostPower(void);
DateTime now();
Expand Down Expand Up @@ -401,10 +401,10 @@ class RTC_DS3231 : RTC_I2C {
/**************************************************************************/
class RTC_PCF8523 : RTC_I2C {
public:
boolean begin(TwoWire *wireInstance = &Wire);
bool begin(TwoWire *wireInstance = &Wire);
void adjust(const DateTime &dt);
boolean lostPower(void);
boolean initialized(void);
bool lostPower(void);
bool initialized(void);
DateTime now();
void start(void);
void stop(void);
Expand All @@ -428,8 +428,8 @@ class RTC_PCF8523 : RTC_I2C {
/**************************************************************************/
class RTC_PCF8563 : RTC_I2C {
public:
boolean begin(TwoWire *wireInstance = &Wire);
boolean lostPower(void);
bool begin(TwoWire *wireInstance = &Wire);
bool lostPower(void);
void adjust(const DateTime &dt);
DateTime now();
void start(void);
Expand Down