Add a way to control the type of the SdFat file being used#87
Add a way to control the type of the SdFat file being used#87mkende wants to merge 1 commit intoadafruit:masterfrom
Conversation
|
@ladyada can you have someone look at these pull requests? Many of them are years old. |
|
What's an example sketch that can be used for testing? Unfortunately, the current file player examples in the library have hard coded |
|
I don’t have a small working example ready that can be used, but just an empty sketch that import the VS1053 library will fail to compile using the rp2040 core: The compilation will succeeds with the new USE_SDFAT_FAT32 constant set (and it will work correctly in more complex sketch using SdFat.h instead of SD.h). |
|
Any chance this can be merged? |
0efc525 to
2aa84fb
Compare
|
Any chance this can be merged some day? This has been open for more than a year (and, to confirm, a no would be a valid answer too, if there is a reason why this change cannot be merged). If the new |
This change introduce a new USE_SDFAT_FAT32 preprocessor variable that can be set to control the compilation of the library. When set, the library will use the File32 and SdFat32 types from the SdFat library rather than the default File and SdFat whose meaning is context dependant. This serves two purposes: - when an Arduino core has an FS.h header then currently the code will not compile because the SdFat and File classes are not defined. - the default SdFat File type on modern core is a typedef for SdFat FsFile type, which has a subset of the interface of the File32 one, which also prevent some existing code from compiling. This change is a no-op for people who don’t define the new variable, so it should not break any existing code.
This change introduce a new USE_SDFAT_FAT32 preprocessor variable that can be set to control the compilation of the library. When set, the library will use the File32 and SdFat32 types from the SdFat library rather than the default File and SdFat whose meaning is context dependant.
This serves two purposes:
This change is a no-op for people who don’t define the new variable, so it should not break any existing code.