Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

README.md 3.6KB

il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ### Warning: This is an early beta version of SdFat Version 2.
  2. This library is in early development and features may change.
  3. It will clearly have bugs. I am posting this version to get comments and
  4. help finding bugs/compatibility problems.
  5. You can help by posting issues for problems you find. I am doing a great deal
  6. of testing but actual applications make the best test cases.
  7. SdFat Version 2 supports FAT16/FAT32 and exFAT SD cards. It is mostly
  8. backward compatible with SdFat Version 1 for FAT16/FAT32 cards.
  9. exFAT supports files larger than 4GB so files sizes and positions are
  10. type uint64_t for classes that support exFAT.
  11. exFAT has many features not available in FAT16/FAT32. exFAT has excellent
  12. support for contiguous files on flash devices and supports preallocation.
  13. If the SD card is the only SPI device, use dedicated SPI mode. This can
  14. greatly improve performance. See the bench example.
  15. Here is write performance for an old, 2011, card on a Due board.
  16. ```
  17. Shared SPI:
  18. write speed and latency
  19. speed,max,min,avg
  20. KB/Sec,usec,usec,usec
  21. 294.45,24944,1398,1737
  22. Dedicated SPI:
  23. write speed and latency
  24. speed,max,min,avg
  25. KB/Sec,usec,usec,usec
  26. 3965.11,16733,110,127
  27. ```
  28. The default version of SdFatConfig.h enables support for dedicated SPI and
  29. optimized access to contiguous files. This make SdFat Version 2 slightly
  30. larger than Version 1. If these features are disabled, Version 2 is smaller
  31. than Version 1.
  32. The types for the classes SdFat and File are defined in SdFatConfig.h.
  33. The default version of SdFatConfig.h defines SdFat to only support FAT16/FAT32.
  34. SdFat and File are defined in terms of more basic classes by typedefs. You
  35. can use these basic classes in applications.
  36. Support for exFAT requires a substantial amount of flash. Here are sizes on
  37. an UNO for a simple program that opens a file, prints one line, and closes
  38. the file.
  39. ```
  40. FAT16/FAT32 only: 9780 bytes flash, 875 bytes SRAM.
  41. exFAT only: 13830 bytes flash, 938 bytes SRAM.
  42. FAT16/FAT32/exFAT: 19326 bytes flash, 928 bytes SRAM.
  43. ```
  44. The section below of SdFatConfig.h has been edited to uses FAT16/FAT32 for
  45. small AVR boards and FAT16/FAT32/exFAT for all other boards.
  46. ```
  47. /**
  48. * File types for SdFat, File, SdFile, SdBaseFile, fstream,
  49. * ifstream, and ofstream.
  50. *
  51. * Set SDFAT_FILE_TYPE to:
  52. *
  53. * 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
  54. */
  55. #if defined(__AVR__) && FLASHEND < 0X8000
  56. // FAT16/FAT32 for 32K AVR boards.
  57. #define SDFAT_FILE_TYPE 1
  58. #else // defined(__AVR__) && FLASHEND < 0X8000
  59. // FAT16/FAT32 and exFAT for all other boards.
  60. #define SDFAT_FILE_TYPE 3
  61. #endif // defined(__AVR__) && FLASHEND < 0X8000
  62. ```
  63. The SdBaseFile class has no Arduino Stream or Print support.
  64. The File class is derived from Stream and SdBaseFile.
  65. The SdFile class is derived from SdBaseFile and Print.
  66. Please try the examples. Start with SdInfo, bench, and ExFatLogger.
  67. To use SdFat Version 2, unzip the download file, rename the library folder
  68. SdFat and place the SdFat folder into the libraries sub-folder in your main
  69. sketch folder.
  70. For more information see the Manual installation section of this guide:
  71. http://arduino.cc/en/Guide/Libraries
  72. A number of configuration options can be set by editing SdFatConfig.h
  73. define macros. See the html documentation File tab for details.
  74. Please read the html documentation for this library in SdFat/extras/SdFat.html.
  75. Start with the Main Page. Next go to the Classes tab and read the
  76. documentation for the classes SdFat32, SdExFat, SdFs, File32, ExFile, FsFile.
  77. The SdFat and File classes are defined in terms of the above classes by
  78. typedefs. Edit SdFatConfig.h to select class options.
  79. Please continue by reading the html documentation in the SdFat/extras folder.