#include "Sdcard.h" #include #include #include using tt::hal::sdcard::SpiSdCardDevice; constexpr auto TDECK_SDCARD_PIN_CS = GPIO_NUM_39; constexpr auto TDECK_LCD_PIN_CS = GPIO_NUM_12; constexpr auto TDECK_RADIO_PIN_CS = GPIO_NUM_9; std::shared_ptr createSdCard() { auto configuration = std::make_unique( TDECK_SDCARD_PIN_CS, GPIO_NUM_NC, GPIO_NUM_NC, GPIO_NUM_NC, SdCardDevice::MountBehaviour::AtBoot, tt::lvgl::getSyncLock(), std::vector { TDECK_RADIO_PIN_CS, TDECK_LCD_PIN_CS } ); ::Device* spiController = device_find_by_name("spi0"); check(spiController != nullptr, "spi0 not found"); return std::make_shared( std::move(configuration), spiController ); }