浏览代码

Fix Cortex-M0 Hard Fault

Bill Greiman 3 年之前
父节点
当前提交
caece65d13
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      library.properties
  2. 2 2
      src/SdFat.h
  3. 2 2
      src/SdFatConfig.h

+ 1 - 1
library.properties

@@ -1,5 +1,5 @@
 name=SdFat
-version=2.0.6
+version=2.0.7
 license=MIT
 author=Bill Greiman <fat16lib@sbcglobal.net>
 maintainer=Bill Greiman <fat16lib@sbcglobal.net>

+ 2 - 2
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

+ 2 - 2
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