I use SdFat v2.0b ("SdFat-Beta") for a Teensy 3.6 project that also uses the Audio board & library and a number of other bus-based sensors and libraries. The SdFat configuration documentation is confusing but it's actually very simple to install and use -- everything I've used works perfectly, and I am happy with it.
Today I decided it would be useful to instantiate two instances of SdFat for two different SD adaptors: the built-in SD on the Teensy 3.6 and the SD on the Audio board.
However, SdFat *appears* to be set up so that a single set of #defines in SdFatConfig.h control which of the four modes is used (FIFO_SDIO, DMA_SDIO, SPI_Dedicated, SPI_Shared). This config file also sets which pins are used for SPI, so it appears I'd have to modify the library to support instantiating multiple instances to handle multiple SD cards.
For my purposes it's probably fine to branch SdFat just for this project, but I'm wondering if anybody has already encountered or addressed this issue, and if so, how. My first thought is to pass the desired configuration file (or perhaps just a struct containing the necessary data elements) as a parameter.
P.S.
I love SdFat v2.0b (SdFat-Beta) with its ExFat support because it solved all my "episodic latency" problems, speeded up SD writes amazingly, and solved my licensing problems. I have been using it for some time and have found it compatible with every teensy library I've tried. If properly configured it typically doesn't even require any modifications. If mods are needed it's usually just a single line. If anybody else has been struggling with speed or write latency issues in SD, this is the solution.
Huge thanks to Bill Greiman for this and for the original code underlying the old SD library.
Today I decided it would be useful to instantiate two instances of SdFat for two different SD adaptors: the built-in SD on the Teensy 3.6 and the SD on the Audio board.
However, SdFat *appears* to be set up so that a single set of #defines in SdFatConfig.h control which of the four modes is used (FIFO_SDIO, DMA_SDIO, SPI_Dedicated, SPI_Shared). This config file also sets which pins are used for SPI, so it appears I'd have to modify the library to support instantiating multiple instances to handle multiple SD cards.
For my purposes it's probably fine to branch SdFat just for this project, but I'm wondering if anybody has already encountered or addressed this issue, and if so, how. My first thought is to pass the desired configuration file (or perhaps just a struct containing the necessary data elements) as a parameter.
P.S.
I love SdFat v2.0b (SdFat-Beta) with its ExFat support because it solved all my "episodic latency" problems, speeded up SD writes amazingly, and solved my licensing problems. I have been using it for some time and have found it compatible with every teensy library I've tried. If properly configured it typically doesn't even require any modifications. If mods are needed it's usually just a single line. If anybody else has been struggling with speed or write latency issues in SD, this is the solution.
Huge thanks to Bill Greiman for this and for the original code underlying the old SD library.