mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
26 lines
641 B
C++
26 lines
641 B
C++
#include "CrowPanelSdCard.h"
|
|
|
|
#include <Tactility/lvgl/LvglSync.h>
|
|
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
|
|
|
using tt::hal::sdcard::SpiSdCardDevice;
|
|
|
|
std::shared_ptr<SdCardDevice> createSdCard() {
|
|
auto* configuration = new SpiSdCardDevice::Config(
|
|
GPIO_NUM_5,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
SdCardDevice::MountBehaviour::AtBoot,
|
|
tt::lvgl::getSyncLock(),
|
|
{},
|
|
SPI3_HOST
|
|
);
|
|
|
|
auto* sdcard = (SdCardDevice*) new SpiSdCardDevice(
|
|
std::unique_ptr<SpiSdCardDevice::Config>(configuration)
|
|
);
|
|
|
|
return std::shared_ptr<SdCardDevice>(sdcard);
|
|
}
|