#include "SdCard.h" #include using tt::hal::sdcard::SpiSdCardDevice; using SdCardDevice = tt::hal::sdcard::SdCardDevice; std::shared_ptr createSdCard() { auto configuration = std::make_unique( SD_CS_PIN, // CS pin (IO5 on the module) GPIO_NUM_NC, // MOSI override: leave NC to use SPI host pins GPIO_NUM_NC, // MISO override: leave NC GPIO_NUM_NC, // SCLK override: leave NC SdCardDevice::MountBehaviour::AtBoot, std::make_shared(tt::Mutex::Type::Recursive), std::vector(), SD_SPI_HOST // SPI host for SD card (SPI3_HOST) ); return std::make_shared( std::move(configuration) ); }