// Instead of the usual SD.begin(pin), you can access the underlying
// SdFat library for much more control over how the SD card is
// accessed. Uncomment one of these, or craft your own if you wish
// to use SdFat's many special features.
// Faster SPI frequency. 16 MHz is default for longer / messy wiring.
ok = SD.sdfs.begin(SdSpiConfig(chipSelect, SHARED_SPI, SD_SCK_MHZ(24)));
// Very slow SPI frequency. May be useful for hardware with slow buffers.
//ok = SD.sdfs.begin(SdSpiConfig(chipSelect, SHARED_SPI, SD_SCK_MHZ(4)));
// SdFat offers DEDICATED_SPI optimation when no other SPI chips are
// connected. More CPU time is used and results may vary depending on
// interrupts, but for many cases speed is much faster.
//ok = SD.sdfs.begin(SdSpiConfig(chipSelect, DEDICATED_SPI, SD_SCK_MHZ(16)));
// Different SPI port (Teensy 4.1 SPI1 is MOSI1:pin26, MISO1:pin1, SCK1:pin27)
// SPI1 photo: https://forum.pjrc.com/threads/69254?p=297875&viewfull=1#post297875
// SPI2 photo: https://forum.pjrc.com/threads/60954?p=303782&viewfull=1#post303782
//ok = SD.sdfs.begin(SdSpiConfig(chipSelect, SHARED_SPI, SD_SCK_MHZ(16), &SPI1));
// Access the built in SD card on Teensy 3.5, 3.6, 4.1 using FIFO
//ok = SD.sdfs.begin(SdioConfig(FIFO_SDIO));
// Access the built in SD card on Teensy 3.5, 3.6, 4.1 using DMA (maybe faster)
//ok = SD.sdfs.begin(SdioConfig(DMA_SDIO));