Skip to content

Commit 49af244

Browse files
authored
Merge pull request #259 from edgar-bonet/use-bool
Replace `boolean` type by `bool`
2 parents 6f73714 + b693600 commit 49af244

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/RTC_DS1307.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@return True if Wire can find DS1307 or false otherwise.
1212
*/
1313
/**************************************************************************/
14-
boolean RTC_DS1307::begin(TwoWire *wireInstance) {
14+
bool RTC_DS1307::begin(TwoWire *wireInstance) {
1515
if (i2c_dev)
1616
delete i2c_dev;
1717
i2c_dev = new Adafruit_I2CDevice(DS1307_ADDRESS, wireInstance);

src/RTC_DS3231.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@return True if Wire can find DS3231 or false otherwise.
1818
*/
1919
/**************************************************************************/
20-
boolean RTC_DS3231::begin(TwoWire *wireInstance) {
20+
bool RTC_DS3231::begin(TwoWire *wireInstance) {
2121
if (i2c_dev)
2222
delete i2c_dev;
2323
i2c_dev = new Adafruit_I2CDevice(DS3231_ADDRESS, wireInstance);

src/RTC_PCF8523.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@return True if Wire can find PCF8523 or false otherwise.
1818
*/
1919
/**************************************************************************/
20-
boolean RTC_PCF8523::begin(TwoWire *wireInstance) {
20+
bool RTC_PCF8523::begin(TwoWire *wireInstance) {
2121
if (i2c_dev)
2222
delete i2c_dev;
2323
i2c_dev = new Adafruit_I2CDevice(PCF8523_ADDRESS, wireInstance);
@@ -37,7 +37,7 @@ boolean RTC_PCF8523::begin(TwoWire *wireInstance) {
3737
after the bit is cleared, for instance with adjust()
3838
*/
3939
/**************************************************************************/
40-
boolean RTC_PCF8523::lostPower(void) {
40+
bool RTC_PCF8523::lostPower(void) {
4141
return read_register(PCF8523_STATUSREG) >> 7;
4242
}
4343

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

src/RTC_PCF8563.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@return True if Wire can find PCF8563 or false otherwise.
1515
*/
1616
/**************************************************************************/
17-
boolean RTC_PCF8563::begin(TwoWire *wireInstance) {
17+
bool RTC_PCF8563::begin(TwoWire *wireInstance) {
1818
if (i2c_dev)
1919
delete i2c_dev;
2020
i2c_dev = new Adafruit_I2CDevice(PCF8563_ADDRESS, wireInstance);
@@ -34,7 +34,7 @@ boolean RTC_PCF8563::begin(TwoWire *wireInstance) {
3434
cleared using adjust()
3535
*/
3636
/**************************************************************************/
37-
boolean RTC_PCF8563::lostPower(void) {
37+
bool RTC_PCF8563::lostPower(void) {
3838
return read_register(PCF8563_VL_SECONDS) >> 7;
3939
}
4040

src/RTClib.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ class RTC_I2C {
350350
/**************************************************************************/
351351
class RTC_DS1307 : RTC_I2C {
352352
public:
353-
boolean begin(TwoWire *wireInstance = &Wire);
353+
bool begin(TwoWire *wireInstance = &Wire);
354354
void adjust(const DateTime &dt);
355355
uint8_t isrunning(void);
356356
DateTime now();
@@ -369,7 +369,7 @@ class RTC_DS1307 : RTC_I2C {
369369
/**************************************************************************/
370370
class RTC_DS3231 : RTC_I2C {
371371
public:
372-
boolean begin(TwoWire *wireInstance = &Wire);
372+
bool begin(TwoWire *wireInstance = &Wire);
373373
void adjust(const DateTime &dt);
374374
bool lostPower(void);
375375
DateTime now();
@@ -401,10 +401,10 @@ class RTC_DS3231 : RTC_I2C {
401401
/**************************************************************************/
402402
class RTC_PCF8523 : RTC_I2C {
403403
public:
404-
boolean begin(TwoWire *wireInstance = &Wire);
404+
bool begin(TwoWire *wireInstance = &Wire);
405405
void adjust(const DateTime &dt);
406-
boolean lostPower(void);
407-
boolean initialized(void);
406+
bool lostPower(void);
407+
bool initialized(void);
408408
DateTime now();
409409
void start(void);
410410
void stop(void);
@@ -428,8 +428,8 @@ class RTC_PCF8523 : RTC_I2C {
428428
/**************************************************************************/
429429
class RTC_PCF8563 : RTC_I2C {
430430
public:
431-
boolean begin(TwoWire *wireInstance = &Wire);
432-
boolean lostPower(void);
431+
bool begin(TwoWire *wireInstance = &Wire);
432+
bool lostPower(void);
433433
void adjust(const DateTime &dt);
434434
DateTime now();
435435
void start(void);

0 commit comments

Comments
 (0)