The use of bool in the header file and boolean in the cpp file causes compilation errors on some board platforms, specifically the ATTinyCore by Spence Konde, when compiling for an attiny85 using the Arduino IDE version 1.8.16.
/home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp: At global scope:
/home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:695:6: error: prototype for 'void Adafruit_7segment::writeDigitNum(uint8_t, uint8_t, boolean)' does not match any in class 'Adafruit_7segment'
void Adafruit_7segment::writeDigitNum(uint8_t d, uint8_t num, boolean dot) {
^~~~~
In file included from /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:38:0:
/home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.h:376:8: error: candidate is: void Adafruit_7segment::writeDigitNum(uint8_t, uint8_t, bool)
void writeDigitNum(uint8_t x, uint8_t num, bool dot = false);
^~~~~
/home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:726:6: error: prototype for 'void Adafruit_7segment::writeDigitAscii(uint8_t, uint8_t, boolean)' does not match any in class 'Adafruit_7segment'
void Adafruit_7segment::writeDigitAscii(uint8_t d, uint8_t c, boolean dot) {
^~~~~
In file included from /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:38:0:
/home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.h:384:8: error: candidate is: void Adafruit_7segment::writeDigitAscii(uint8_t, uint8_t, bool)
void writeDigitAscii(uint8_t x, uint8_t c, bool dot = false);
^~~~~~~
The Adafruit_LEDBackpack.h file has the following function prototypes:
void writeDigitNum(uint8_t x, uint8_t num, bool dot = false); void writeDigitAscii(uint8_t x, uint8_t c, bool dot = false);
while Adafruit_LEDBackpack.cpp has the function definitions:
void Adafruit_7segment::writeDigitNum(uint8_t d, uint8_t num, boolean dot) { void Adafruit_7segment::writeDigitAscii(uint8_t d, uint8_t c, boolean dot) {
The use of bool in the header file and boolean in the cpp file causes compilation errors on some board platforms, specifically the ATTinyCore by Spence Konde, when compiling for an attiny85 using the Arduino IDE version 1.8.16.
/home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp: At global scope: /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:695:6: error: prototype for 'void Adafruit_7segment::writeDigitNum(uint8_t, uint8_t, boolean)' does not match any in class 'Adafruit_7segment' void Adafruit_7segment::writeDigitNum(uint8_t d, uint8_t num, boolean dot) { ^
~~~~ In file included from /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:38:0: /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.h:376:8: error: candidate is: void Adafruit_7segment::writeDigitNum(uint8_t, uint8_t, bool) void writeDigitNum(uint8_t x, uint8_t num, bool dot = false); ^~~~~ /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:726:6: error: prototype for 'void Adafruit_7segment::writeDigitAscii(uint8_t, uint8_t, boolean)' does not match any in class 'Adafruit_7segment' void Adafruit_7segment::writeDigitAscii(uint8_t d, uint8_t c, boolean dot) { ^~~~~ In file included from /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.cpp:38:0: /home/test/Arduino/libraries/Adafruit_LED_Backpack_Library/Adafruit_LEDBackpack.h:384:8: error: candidate is: void Adafruit_7segment::writeDigitAscii(uint8_t, uint8_t, bool) void writeDigitAscii(uint8_t x, uint8_t c, bool dot = false); ^~~~~~~