From 439ae314b3d8b3c8c2f22d11dac357754539e161 Mon Sep 17 00:00:00 2001 From: n-gineer Date: Tue, 23 Jun 2020 22:30:44 -0400 Subject: [PATCH] Enable use on MEGA AVR boards which rely on Print.h being declared inside the arduino namespace. The ifdef statement ensures "using arduino namespace" is only invoked for the boards that need it, to remain compatible with AVR boards. --- src/LiquidCrystal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/LiquidCrystal.h b/src/LiquidCrystal.h index da950ce..58107a7 100644 --- a/src/LiquidCrystal.h +++ b/src/LiquidCrystal.h @@ -42,6 +42,10 @@ #define LCD_5x10DOTS 0x04 #define LCD_5x8DOTS 0x00 +#ifdef ARDUINO_ARCH_MEGAAVR +using namespace arduino; //!< MEGA AVR architecture uses the arduino namespace +#endif //!< but AVR arch does not + class LiquidCrystal : public Print { public: LiquidCrystal(uint8_t rs, uint8_t enable,