Ken Van Hoeylandt 778e003d4d
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
2025-03-11 21:21:44 +01:00

32 lines
787 B
C++

#include "YellowSdCard.h"
#define TAG "cyd8048s043c_sdcard"
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/lvgl/LvglSync.h>
#define SDCARD_SPI_HOST SPI2_HOST
#define SDCARD_PIN_CS GPIO_NUM_10
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createYellowSdCard() {
auto* configuration = new SpiSdCardDevice::Config(
SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
std::make_shared<tt::Mutex>(),
std::vector<gpio_num_t>(),
SDCARD_SPI_HOST
);
auto* sdcard = (SdCardDevice*) new SpiSdCardDevice(
std::unique_ptr<SpiSdCardDevice::Config>(configuration)
);
return std::shared_ptr<SdCardDevice>(sdcard);
}