mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
* 550 Buffer size * 043 to use the RgbDisplay driver too Both rgb displays are pretty snappy (as snappy as 800 * 480 can be on an esp32)
26 lines
639 B
C++
26 lines
639 B
C++
#include "CydSdCard.h"
|
|
|
|
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
|
#include <Tactility/lvgl/LvglSync.h>
|
|
|
|
using tt::hal::sdcard::SpiSdCardDevice;
|
|
|
|
std::shared_ptr<SdCardDevice> createSdCard() {
|
|
auto config = std::make_unique<SpiSdCardDevice::Config>(
|
|
GPIO_NUM_10,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
SdCardDevice::MountBehaviour::AtBoot,
|
|
std::make_shared<tt::Mutex>(),
|
|
std::vector<gpio_num_t>(),
|
|
SPI2_HOST
|
|
);
|
|
|
|
auto sdcard = std::make_shared<SpiSdCardDevice>(
|
|
std::move(config)
|
|
);
|
|
|
|
return std::static_pointer_cast<SdCardDevice>(sdcard);
|
|
}
|