From 5080bec82279b56362d6d2332311564322afcafa Mon Sep 17 00:00:00 2001 From: Zane Bauman Date: Thu, 18 Jul 2024 10:16:19 -0400 Subject: [PATCH] Allow using ATtiny84 (#455) --- Adafruit_GrayOLED.cpp | 3 ++- Adafruit_GrayOLED.h | 5 +++-- Adafruit_SPITFT.cpp | 5 +++-- Adafruit_SPITFT.h | 5 +++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Adafruit_GrayOLED.cpp b/Adafruit_GrayOLED.cpp index f487861..7c44825 100644 --- a/Adafruit_GrayOLED.cpp +++ b/Adafruit_GrayOLED.cpp @@ -15,7 +15,8 @@ * */ -#if !defined(__AVR_ATtiny85__) // Not for ATtiny, at all +// Not for ATtiny, at all +#if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__) #include "Adafruit_GrayOLED.h" #include diff --git a/Adafruit_GrayOLED.h b/Adafruit_GrayOLED.h index 8ec7b23..e1f097f 100644 --- a/Adafruit_GrayOLED.h +++ b/Adafruit_GrayOLED.h @@ -24,7 +24,8 @@ #ifndef _Adafruit_GRAYOLED_H_ #define _Adafruit_GRAYOLED_H_ -#if !defined(__AVR_ATtiny85__) // Not for ATtiny, at all +// Not for ATtiny, at all +#if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__) #include #include @@ -96,5 +97,5 @@ private: TwoWire *_theWire = NULL; ///< The underlying hardware I2C }; -#endif // end __AVR_ATtiny85__ +#endif // end __AVR_ATtiny85__ __AVR_ATtiny84__ #endif // _Adafruit_GrayOLED_H_ diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index eeffce7..df98cf5 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -31,7 +31,8 @@ * BSD license, all text here must be included in any redistribution. */ -#if !defined(__AVR_ATtiny85__) // Not for ATtiny, at all +// Not for ATtiny, at all +#if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__) #include "Adafruit_SPITFT.h" @@ -2558,4 +2559,4 @@ inline void Adafruit_SPITFT::TFT_RD_LOW(void) { #endif // end !USE_FAST_PINIO } -#endif // end __AVR_ATtiny85__ +#endif // end __AVR_ATtiny85__ __AVR_ATtiny84__ diff --git a/Adafruit_SPITFT.h b/Adafruit_SPITFT.h index 8064a74..4111d95 100644 --- a/Adafruit_SPITFT.h +++ b/Adafruit_SPITFT.h @@ -20,7 +20,8 @@ #ifndef _ADAFRUIT_SPITFT_H_ #define _ADAFRUIT_SPITFT_H_ -#if !defined(__AVR_ATtiny85__) // Not for ATtiny, at all +// Not for ATtiny, at all +#if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__) #include "Adafruit_GFX.h" #include @@ -526,5 +527,5 @@ protected: uint32_t _freq = 0; ///< Dummy var to keep subclasses happy }; -#endif // end __AVR_ATtiny85__ +#endif // end __AVR_ATtiny85__ __AVR_ATtiny84__ #endif // end _ADAFRUIT_SPITFT_H_