- Updated all boards to use `hal::Configuration.createDevices` - Updated all boards to use new directory structure and file naming convention - Refactored `Xpt2046SoftSpi` driver. - Created `Axp2101Power` device in `Drivers/AXP2101` - Removed global static instances from some drivers (instances that kept a reference to the Device*) - Improved `SystemInfoApp` UI: better memory labels, hide external memory bar when there's no PSRAM - Fix for HAL: register touch devices after displays are registered - Fix for Boot splash hanging on WiFi init: unlock file lock after using it
22 lines
681 B
C++
22 lines
681 B
C++
#include "SdCard.h"
|
|
|
|
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
|
#include <Tactility/lvgl/LvglSync.h>
|
|
|
|
using tt::hal::sdcard::SpiSdCardDevice;
|
|
|
|
std::shared_ptr<SdCardDevice> createSdCard() {
|
|
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
|
|
// See https://github.com/Elecrow-RD/CrowPanel-Advance-HMI-ESP32-AI-Display/blob/master/5.0/factory_code/factory_code.ino
|
|
GPIO_NUM_0, // It's actually not connected, but in the demo pin 0 is used
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
SdCardDevice::MountBehaviour::AtBoot
|
|
);
|
|
|
|
return std::make_shared<SpiSdCardDevice>(
|
|
std::move(configuration)
|
|
);
|
|
}
|