changes.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. 9 Mar 2019
  2. Add startCluste argument to createContiguous().
  3. Functions to support SdFatLite library.
  4. 28 Dec 2018
  5. Support for multiple SPI ports now uses a pointer to a SPIClass object.
  6. See the STM32Test example.
  7. explicit SdFat(SPIClass* spiPort);
  8. \\ or
  9. explicit SdFatEX(SPIClass* spiPort);
  10. Open flags for Particle Gen3 and ARM boards are now defined by fcntl.h.
  11. See SdFatConfig.h for options.
  12. Support for particle Gen3 devices.
  13. New cluster allocation algorithm.
  14. 26 Apr 2017
  15. The SPI divisor has been replaced by SPISettings in the begin() call.
  16. bool begin(uint8_t csPin = SS, SPISettings spiSettings = SPI_FULL_SPEED);
  17. Several macros have been defined for backward compatibility.
  18. #define SD_SCK_MHZ(maxMhz) SPISettings(1000000UL*maxMhz, MSBFIRST, SPI_MODE0)
  19. // SPI divisor constants
  20. /** Set SCK to max possible rate. */
  21. #define SPI_FULL_SPEED SD_SCK_MHZ(50)
  22. /** Set SCK rate to F_CPU/3 for Due */
  23. #define SPI_DIV3_SPEED SD_SCK_HZ(F_CPU/3)
  24. /** Set SCK rate to F_CPU/4. */
  25. #define SPI_HALF_SPEED SD_SCK_HZ(F_CPU/4)
  26. // ...
  27. There are two new classes, SdFatEX and SdFatSoftSpiEX.
  28. Teensy 3.5/3.6 SDIO support has been added. Try the TeensySdioDemo example.
  29. Many other example will work with Teensy SDIO if you use the SdFatSdio classes
  30. and call begin with no parameters.
  31. SdFatSdio sd;
  32. ....
  33. if (!sd.begin()) {
  34. // Handle failure.
  35. }
  36. 13 Sep 2016
  37. Added SdFatSdioEX class with Extended SD I/O.
  38. 5 Sep 2016
  39. Restructured classes to support SPI and SDIO controllers.
  40. Support for Teensy 3.5/3.6 SDIO.
  41. Added TeensySdioDemo example.
  42. 15 Aug 2016
  43. New classes SdFatEX and SdFatSoftSpiEX with Extended SD I/O.
  44. These classes provide higher performance but require a dedicated
  45. SPI port.
  46. The symbol SD_SPI_CONFIGURATION has been replaced by three symbols,
  47. ENABLE_EXTENDED_TRANSFER_CLASS, USE_STANDARD_SPI_LIBRARY, and
  48. ENABLE_SOFTWARE_SPI_CLASS to define the SPI configuration.
  49. SPI transactions are always used.
  50. The SPI divisor has been replaced by SPISettings. A new macro
  51. is used to generate SPISettings. This call will use the highest
  52. speed supported by the board that is not over 50 MHz.
  53. sd.begin(CS_PIN, SD_SCK_MHZ(50));
  54. SdFat on STM32 now supports a SdFat constructor with the SPI
  55. port number. See the STM32Test example for sample use.
  56. New versions of LowLatencyLogger for ADC, ADXL345, and MPU6050.
  57. Many internal changes to simplify ports to RTOS.
  58. 19 jul 2016
  59. Fix for multi-block transfers chip select.
  60. 27 Apr 2016
  61. Mods for STM32F1
  62. 11 Apr 2016
  63. Mods for ESP8266
  64. 9 Apr 2016
  65. Fix beginTransaction call for Standard SPI library
  66. 14 Feb 2016
  67. Add startMicros to LowLatencyLogger
  68. 12 Feb 2016
  69. Mods for Particle.io boards.
  70. Features for shared SPI with multiple block write.
  71. 23 Jan 2016
  72. New Examples.
  73. New SPI structure for ports to boards like the Particle Photon/Electron.
  74. Several bug fixes.
  75. 19 Jul 2015
  76. Converted to 1.5x library format.
  77. Use standard SPI library if no custom SPI library is available for a board.
  78. Option to maintain freeClusterCount.
  79. 16 Mar 2015
  80. Minimal support for Teensy-LC.
  81. 23 Feb 2015
  82. New 1284P software SPI macros.
  83. 01 Feb 2015
  84. Code cleanup and re-factor.
  85. 04 Dec 2014
  86. Added support for Long File Names.
  87. 14 Nov 2014
  88. Replaced the core SdFat code with FatLib, a generic FAT12/FAT16/FAT32
  89. library. This may result in bugs and backward compatibility problems.
  90. Added SdFatSoftSpi, software SPI template class.
  91. Allow simultaneous use of hardware and software SPI with multiple cards.
  92. See the ThreeCard example.
  93. Added minimal Long File Name support. See the LongFileName example.
  94. 25 Oct 2014
  95. Added File class for compatibility with the Arduino SD.h library
  96. Added StreamParseInt example.
  97. 23 Oct 2014
  98. Added Read SD OCR register.
  99. SdInfo example now prints OCR register.
  100. 05 Sep 2014
  101. Faster SdBaseFile::printField();
  102. Added SdBaseFile::printField(float value, char term, uint8_t prec);
  103. 24 Aug 2014
  104. Added support for Software SPI on Due and Teensy 3.1
  105. Added support for SPI transactions.
  106. 05 Aug 2014
  107. New examples.
  108. Teensy 3.x SPI mods.
  109. Test version of StdioStream.
  110. 25 Dec 2013
  111. Improved cluster allocation speed.
  112. Fix for Teensy 3.0
  113. 21 Jun 2013
  114. Improved speed of single block write.
  115. Added StressTest example.
  116. 04 May 2013
  117. Fix FreeRam() for 1.05/1.53 malloc.
  118. Reorganised SPI code.
  119. SPI speed set by SCK divisor.
  120. Faster directory search in file open.
  121. Removed deprecated functions.
  122. 13 Mar 2013
  123. Fix for 1.0.4 malloc
  124. New Software SPI
  125. 07 Feb 2013
  126. Patch for 1.5.2 version of malloc.
  127. Updated SPI driver for Teensy 3.0
  128. Added fast printField() functions.
  129. 19 Dec 2012
  130. Fixed SoftSPI bug
  131. 01 Dec 2012
  132. Added support for the Arduino Due.
  133. The default for ALLOW_DEPRECATED_FUNCTIONS has been changed to
  134. false. If you get compile errors for these functions, either
  135. change to the preferred replacement function indicated in the
  136. error message or set ALLOW_DEPRECATED_FUNCTIONS nonzero.
  137. A key change was to remove sd.init(spiRateID, chipSelect) in favor of
  138. sd.begin(chipSelect, spiRateID). The difference between these two is
  139. the order of the arguments which has caused serious confusion at times.
  140. A massive number of internal changes have been made. There are over 2600
  141. lines in the diff file of this version and the 20120719 version.
  142. 20 Oct 2012
  143. Changes to support ARM processors. Tested with a Teensy 3.0.
  144. Changes for higher performance with large reads and writes.
  145. 25 Aug 2012
  146. Added uint32_t available();
  147. Support for new industrial SD cards
  148. Better support for MiniSerial and MiniSerial example
  149. Changes to support newer versions of avr-gcc
  150. Changed RawWrite example to use micros() for delay between blocks.
  151. Changed SdFatSize example to use MiniSerial
  152. 19 Jul 2012
  153. Require Arduino 1.0 or greater. Change file type for all examples to *.ino.
  154. Modify the SdFormatter example to format SDXC cards as FAT32. This is not the
  155. SDXC standard which is exFAT.
  156. 30 May 2012
  157. Added << operator for Arduino flash string macro F().
  158. New RawWrite example for fast write of contiguous files.
  159. New faster software SPI
  160. Software SPI for Leonardo boards
  161. Don't use __cxa_pure_virtual by default for Arduino 1.0 or greater.
  162. 26 Mar 2012
  163. Removed definition for SS_PIN, MISO_PIN, MOSI_PIN, and SCK_PIN. Used the
  164. Arduino 1.0 symbols SS, MISO, MOSI, and SCK.
  165. Added Arduino style SdFat::begin(chipSelect, spiSpeed);
  166. Added options for SD crc checking. Enabling crc checking increases reliability
  167. at the cost of speed. Edit SdFatConfig.h to select CRC options.
  168. Override Print::getWriteError() and Print::clearWriteError() to use
  169. SdBaseFile functions.
  170. Many internal changes.
  171. 08 Jan 2012
  172. Changes to allow use of the SerialPort library.
  173. Error messages and output from programs are now sent to a stdOut Print
  174. stream.
  175. The default stdOut is a small non-interrupt driven class that outputs messages
  176. to serial port zero. This allows an alternate Serial library like SerialPort
  177. to be used with SdFat.
  178. You can redirect stdOut with SdFat::setStdOut(Print* stream) and
  179. get the current stdOut stream with SdFat::stdOut().
  180. If USE_SERIAL_FOR_STD_OUT in SdFatConfig.h is nonzero, the Arduino Serial
  181. object will be used as the default for stdOut.
  182. 05 Dec 2011
  183. Changes for Arduino 1.0
  184. 17 Sep 2011
  185. Changes for Arduino 1.0 beta 4
  186. Improved SPI handling
  187. 02 Sep 2011
  188. --------------------------------------------------------------------------------
  189. Warning:
  190. Several changes are not backward compatible with the previous
  191. version of SdFat.
  192. The function cwd() was renamed vwd() to allow multiple SD cards.
  193. The type SdBaseFile was added to the class hierarchy to avoid conflicts with
  194. other Arduino libraries that are derived from the Print class. Directory
  195. files should be declared type SdBaseFile.
  196. --------------------------------------------------------------------------------
  197. Added support for multiple SD cards.
  198. Change the name of SdFat::cwd() to SdFat::vwd() since the volume
  199. working directory is not the current working directory with
  200. multiple SD cards.
  201. Added the static function SdBaseFile::cwd() to return a pointer
  202. to the current working directory.
  203. Added the TwoCards.pde example to demonstrate use of multiple SD cards.
  204. Added readCSV.pde example to demonstrate iostream extractors.
  205. Added bool SdBaseFile::timestamp(SdBaseFile* file) to copy one
  206. file's timestamps to another file.
  207. Improved messages in the QuickStart.pde example.
  208. Added maximum latency test to the bench.pde example.
  209. Rearanged class hierarchy to fix conflicts with Flash.h and other Adruino
  210. libraries. Print is no longer a private parent of file stream classes.
  211. Added high speed multiple block read functions to Sd2Card.
  212. Changed include files in SdFatUtil.h
  213. Removed option to write protect block zero of an SD card.
  214. Changes for Arduino 1.0.
  215. 02 Jul 2011
  216. This is a major update based on previous beta versions.
  217. Read all changes since 10 Oct 2001
  218. Simplified examples in extra/examplesV1
  219. 28 Jun 2011
  220. This is a release candidate to replace sdfatlib20101010.
  221. Initialize SPI bus before every access.
  222. Improved write multiple block functions for fast data logging.
  223. SdVolume::cacheClear() returns zero if it fails.
  224. Documentation changes.
  225. 04 Jun 2011
  226. Added SdFatTestSuite and fixed bugs found by test programs.
  227. Added functions:
  228. bool SdFat::truncate(const char* path, uint32_t length);
  229. int16_t SdFile::fgets(char* str, int16_t num, char* delim);
  230. 11 May 2011
  231. Added QuickStart sketch and QuickStart.txt file for fast hardware test.
  232. Added several new examples.
  233. Version of ls() that can write to any Print object.
  234. New functions including freeClusterCount(), openNext() rename().
  235. 14 Apr 2011
  236. Total rewrite to add iostreams and SdFat class with current working directory.
  237. Old API maintained for backward compatibility.
  238. 27 Nov 2010
  239. Added experimental support for FAT12. This can be enabled by setting
  240. FAT12_SUPPORT nonzero in SdFatConfig.h.
  241. Added an experimental sketch, SdFatFormatter.pde, to format SD cards as
  242. FAT16 and SDHC cards as FAT32. See SdFat/examples/SdFormatter.
  243. The return type of SdVolume::cacheClear was changed to cache_t*.
  244. Many internal changes to support FAT12 and formatting SD/SDHC cards.
  245. 10 Oct 2010
  246. Added Mega 2560.
  247. Fixed rmRfStar() bug.
  248. Fixed Sanguino NULL definition.
  249. 18 Aug 2010
  250. Optimized write() for append at end of file. Up to 50% faster sequential write.
  251. 13 Aug 2010
  252. Added the following function to allow the SD chip select pin to be set
  253. at runtime. Warning - if the hardware SS pin is not used as chip select,
  254. the hardware SS pin will be set to output mode by init(). An avr processor
  255. will not function as an SPI master unless SS is set to output mode.
  256. uint8_t Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin);
  257. Added more SPI clock rate choices. The above init() function and
  258. uint8_t Sd2Card::init(uint8_t sckRateID) call the new function
  259. uint8_t Sd2Card::setSckRate(uint8_t sckRateID).
  260. setSckRate() sets the SPI clock rate to F_CPU/pow(2, 1 + sckRateID).
  261. On an 16 MHz cpu this ranges from 8 MHz for sckRateId = 0 to 125 kHz
  262. for sckRateID = 6. This function must be called after the init() call.
  263. Modified most examples to call card.init(SPI_HALF_SPEED) to avoid SPI bus
  264. errors with breadboards and jumpers. This sets the SPI speed to F_CPU/4.
  265. Defined SPI_FULL_SPEED so init(SPI_FULL_SPEED) sets the SPI speed to F_CPU/2.
  266. Added the following function to cancel date/time callback. This function
  267. must now be used instead of dateTimeCallback(NULL).
  268. static void SdFat::dateTimeCallbackCancel(void);
  269. The following member functions have been added for users who wish to avoid
  270. calls to functions with non-const references.
  271. uint8_t SdFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
  272. uint8_t SdFile::createContiguous(SdFile* dirFile,
  273. const char* fileName, uint32_t size);
  274. static void SdFile::dateTimeCallback(
  275. void (*dateTime)(uint16_t* date, uint16_t* time));
  276. uint8_t SdFile::dirEntry(dir_t* dir);
  277. uint8_t SdFile::makeDir(SdFile* dir, const char* dirName);
  278. uint8_t SdFile::open(SdFile* dirFile, const char* fileName, uint8_t oflag);
  279. uint8_t SdFile::open(SdFile* dirFile, const char* fileName);
  280. uint8_t SdFile::open(SdFile* dirFile, uint16_t index, uint8_t oflag);
  281. uint8_t SdFile::openRoot(SdVolume* vol);
  282. int8_t SdFile::readDir(dir_t* dir);
  283. static uint8_t remove(SdFile* dirFile, const char* fileName);
  284. uint8_t SdVolume::init(Sd2Card* dev);
  285. uint8_t SdVolume::init(Sd2Card* dev, uint8_t part);
  286. The following member functions have been marked as deprecated since they
  287. are now wrappers for the new functions. dateTimeCallback is the only wrapper
  288. with extra overhead. The other wrappers are squeezed out by the complier.
  289. These wrappers will be maintained in the future for backward compatibility.
  290. uint8_t SdFile::contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock);
  291. uint8_t SdFile::createContiguous(SdFile& dirFile,
  292. const char* fileName, uint32_t size);
  293. static void SdFile::dateTimeCallback(
  294. void (*dateTime)(uint16_t& date, uint16_t& time));
  295. uint8_t SdFile::dirEntry(dir_t& dir);
  296. uint8_t SdFile::makeDir(SdFile& dir, const char* dirName);
  297. uint8_t SdFile::open(SdFile& dirFile, const char* fileName, uint8_t oflag);
  298. uint8_t SdFile::open(SdFile& dirFile, const char* fileName);
  299. uint8_t SdFile::open(SdFile& dirFile, uint16_t index, uint8_t oflag);
  300. uint8_t SdFile::openRoot(SdVolume& vol);
  301. int8_t SdFile::readDir(dir_t& dir);
  302. static uint8_t remove(SdFile& dirFile, const char* fileName);
  303. uint8_t SdVolume::init(Sd2Card& dev);
  304. uint8_t SdVolume::init(Sd2Card& dev, uint8_t part);
  305. The deprecated function can be disabled by editing SdFat.h and setting
  306. #define ALLOW_DEPRECATED_FUNCTIONS 0
  307. Fixed file modify time for file rewrite.
  308. Major internal cleanup/reformat based on Google cpplint.py code style.
  309. New Sd2Card::init() algorithm.
  310. New SdFatInfo sketch for modified SdReadData() and other internal changes.
  311. Modified examples to eliminate deprecated functions.
  312. 11 Jun 2010
  313. Added definitions for Teensy to ArduinoPins.h (Paul Stoffregen)
  314. Added troubleshooting.txt
  315. 23 Dec 2009
  316. Added Software SPI capability. See Sd2Card.h
  317. Defining MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used
  318. on Mega Arduinos. Software SPI works well with GPS Shield V1.1
  319. but many SD cards will fail with GPS Shield V1.0.
  320. Added file ArduinoPins.h for pin definitions.
  321. More error printout in examples.
  322. 25 Nov 2009
  323. Added new functions for SdFile class:
  324. dateTimeCallback(), dirEntry(), isRoot(), isSubDir, ls(),
  325. makeDir(), printDirName(), printFatDate(), printFatTime(),
  326. printTwoDigits(), rmDir(), and rmRStar().
  327. Added new examples to test and illustrate use of new functions.
  328. Removed sdCard() from SdFile class.
  329. Fixed several bugs.
  330. 12 Nov 2009
  331. Major rewrite of the version of SdFat that was included with
  332. the WaveRP library.
  333. This is a preview that is being released to obtain comments
  334. from several colleagues and future users.