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
27 lines
640 B
C++
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);
|
|
}
|
|
|