24 lines
609 B
C++
24 lines
609 B
C++
#include "SdCard.h"
|
|
|
|
#include <Tactility/lvgl/LvglSync.h>
|
|
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
|
|
|
using tt::hal::sdcard::SpiSdCardDevice;
|
|
|
|
std::shared_ptr<SdCardDevice> createSdCard() {
|
|
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
|
|
GPIO_NUM_17,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
SdCardDevice::MountBehaviour::AtBoot,
|
|
std::make_shared<tt::Mutex>(tt::Mutex::Type::Recursive),
|
|
std::vector<gpio_num_t>(),
|
|
SPI3_HOST
|
|
);
|
|
|
|
return std::make_shared<SpiSdCardDevice>(
|
|
std::move(configuration)
|
|
);
|
|
}
|