Implemented board CYD-4848S040C (#244)

This commit is contained in:
Shadowtrance
2025-03-13 03:16:03 +10:00
committed by GitHub
parent 2d535fec2a
commit ef410086d9
14 changed files with 567 additions and 27 deletions
@@ -0,0 +1,26 @@
#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);
}