소스 검색

Fix for low power sleep

Bill Greiman 7 년 전
부모
커밋
11d6d9ccf4
4개의 변경된 파일14개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      library.properties
  2. 2 2
      src/SdCard/SdSpiCard.cpp
  3. 1 1
      src/SdFat.h
  4. 10 0
      src/SdFatConfig.h

+ 1 - 1
library.properties

@@ -1,5 +1,5 @@
 name=SdFat
-version=1.0.4
+version=1.0.5
 author=Bill Greiman <fat16lib@sbcglobal.net>
 maintainer=Bill Greiman <fat16lib@sbcglobal.net>
 sentence=FAT16/FAT32 file system for SD cards.

+ 2 - 2
src/SdCard/SdSpiCard.cpp

@@ -539,8 +539,8 @@ bool SdSpiCard::writeBlock(uint32_t blockNumber, const uint8_t* src) {
     goto fail;
   }
 
-#define CHECK_PROGRAMMING 0
-#if CHECK_PROGRAMMING
+
+#if CHECK_FLASH_PROGRAMMING
   // wait for flash programming to complete
   if (!waitNotBusy(SD_WRITE_TIMEOUT)) {
     error(SD_CARD_ERROR_WRITE_TIMEOUT);

+ 1 - 1
src/SdFat.h

@@ -34,7 +34,7 @@
 #include "SdCard/SdioCard.h"
 //------------------------------------------------------------------------------
 /** SdFat version */
-#define SD_FAT_VERSION "1.0.4"
+#define SD_FAT_VERSION "1.0.5"
 //==============================================================================
 /**
  * \class SdBaseFile

+ 10 - 0
src/SdFatConfig.h

@@ -78,6 +78,16 @@
  */
 #define ENABLE_SOFTWARE_SPI_CLASS 0
 //------------------------------------------------------------------------------
+/**
+ * If CHECK_FLASH_PROGRAMMING is zero, overlap of single sector flash 
+ * programming and other operations will be allowed for faster write
+ * performance.
+ *
+ * Some cards will not sleep in low power mode unless CHECK_FLASH_PROGRAMMING
+ * is non-zero.
+ */
+#define CHECK_FLASH_PROGRAMMING 1
+//------------------------------------------------------------------------------
 /**
  * Set MAINTAIN_FREE_CLUSTER_COUNT nonzero to keep the count of free clusters
  * updated.  This will increase the speed of the freeClusterCount() call