Shadowtrance board implementations (#241)
Adapted from pull request https://github.com/ByteWelder/Tactility/pull/238 - JC2432W328C - ST7789 - CST820 (816) 240x320 - 2.8 inch - ESP32-8048S043C - ST7262 - GT911 800x480 - 4.3 inch - JC8048W550C - ST7262 - GT911 800x480 - 5 inch
This commit is contained in:
committed by
GitHub
parent
85a6ad3bbe
commit
778e003d4d
@@ -0,0 +1,25 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user