From caece65d13bad93272b77b9c862175dd4e08b6f9 Mon Sep 17 00:00:00 2001 From: Bill Greiman Date: Thu, 17 Jun 2021 09:33:27 -0700 Subject: [PATCH] Fix Cortex-M0 Hard Fault --- library.properties | 2 +- src/SdFat.h | 4 ++-- src/SdFatConfig.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library.properties b/library.properties index 35c6ddd3..9695d83f 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SdFat -version=2.0.6 +version=2.0.7 license=MIT author=Bill Greiman maintainer=Bill Greiman diff --git a/src/SdFat.h b/src/SdFat.h index 429682f6..17cde582 100644 --- a/src/SdFat.h +++ b/src/SdFat.h @@ -38,9 +38,9 @@ #endif // INCLUDE_SDIOS //------------------------------------------------------------------------------ /** SdFat version for cpp use. */ -#define SD_FAT_VERSION 20006 +#define SD_FAT_VERSION 20007 /** SdFat version as string. */ -#define SD_FAT_VERSION_STR "2.0.6" +#define SD_FAT_VERSION_STR "2.0.7" //============================================================================== /** * \class SdBase diff --git a/src/SdFatConfig.h b/src/SdFatConfig.h index 3b83fb7f..30ab7dc7 100644 --- a/src/SdFatConfig.h +++ b/src/SdFatConfig.h @@ -279,8 +279,8 @@ typedef uint8_t SdCsPin_t; * Set USE_SIMPLE_LITTLE_ENDIAN nonzero for little endian processors * with no memory alignment restrictions. */ -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && !defined(__SAMD21G18A__)\ - && !defined(__MKL26Z64__) && !defined(ESP8266) +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__\ + && (defined(__AVR__) || defined(__ARM_FEATURE_UNALIGNED)) #define USE_SIMPLE_LITTLE_ENDIAN 1 #else // __BYTE_ORDER_ #define USE_SIMPLE_LITTLE_ENDIAN 0