mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
To avoid keeping track of a list that maps board project names to board ids. Because of this change, we don't have to manually edit `boards.cmake` anymore when adding a new board.
22 lines
580 B
C++
22 lines
580 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 config = std::make_unique<SpiSdCardDevice::Config>(
|
|
GPIO_NUM_5,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
SdCardDevice::MountBehaviour::AtBoot,
|
|
std::make_shared<tt::Mutex>(tt::Mutex::Type::Recursive),
|
|
std::vector<gpio_num_t>(),
|
|
SPI3_HOST
|
|
);
|
|
|
|
return std::make_shared<SpiSdCardDevice>(std::move(config));
|
|
}
|
|
|