From 959a2075805caace28f5d526501146eca0f3dff0 Mon Sep 17 00:00:00 2001 From: ladyada Date: Thu, 31 Oct 2019 23:59:49 -0400 Subject: [PATCH] fix for https://github.com/adafruit/Adafruit_BusIO/issues/6 --- Adafruit_SPIDevice.h | 4 ++-- library.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Adafruit_SPIDevice.h b/Adafruit_SPIDevice.h index 3b459e8..6fd004a 100644 --- a/Adafruit_SPIDevice.h +++ b/Adafruit_SPIDevice.h @@ -4,7 +4,7 @@ #define Adafruit_SPIDevice_h // some modern SPI definitions don't have BitOrder enum -#if defined(__AVR__) || defined(ESP8266) || defined(TEENSYDUINO) +#if (defined(__AVR__) && !defined(ARDUINO_ARCH_MEGAAVR)) || defined(ESP8266) || defined(TEENSYDUINO) typedef enum _BitOrder { SPI_BITORDER_MSBFIRST = MSBFIRST, SPI_BITORDER_LSBFIRST = LSBFIRST, @@ -20,7 +20,7 @@ typedef enum _BitOrder { #endif // Some platforms have a BitOrder enum but its named MSBFIRST/LSBFIRST -#if defined(ARDUINO_ARCH_SAMD) || defined(__SAM3X8E__) || defined(NRF52_SERIES) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) +#if defined(ARDUINO_ARCH_SAMD) || defined(__SAM3X8E__) || defined(NRF52_SERIES) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) || defined(ARDUINO_ARCH_MEGAAVR) #define SPI_BITORDER_MSBFIRST MSBFIRST #define SPI_BITORDER_LSBFIRST LSBFIRST #endif diff --git a/library.properties b/library.properties index a898838..aa8e8e8 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit BusIO -version=1.0.8 +version=1.0.9 author=Adafruit maintainer=Adafruit sentence=This is a library for abstracting away UART, I2C and SPI interfacing