Ken Van Hoeylandt 19521791c5
CYD 4848S040C improvements and more (#245)
4848S040C:
- Fix SD card CS pin setting for 
- Fixes for colour
- Implement PwmBacklight driver 

Other:
- Fix for TouchDevice type
- Show landscape launcher for square displays
2025-03-12 23:45:49 +01:00

27 lines
640 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_42,
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);
}