Ken Van Hoeylandt 61277e74b8
Align board project names with board ids (#399)
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.
2025-10-28 09:07:54 +01:00

30 lines
784 B
C++

#include "SdCard.h"
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/lvgl/LvglSync.h>
using tt::hal::sdcard::SpiSdCardDevice;
constexpr auto TPAGER_SDCARD_PIN_CS = GPIO_NUM_21;
constexpr auto TPAGER_LCD_PIN_CS = GPIO_NUM_38;
constexpr auto TPAGER_RADIO_PIN_CS = GPIO_NUM_36;
std::shared_ptr<SdCardDevice> createTpagerSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
TPAGER_SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
tt::lvgl::getSyncLock(),
std::vector {
TPAGER_RADIO_PIN_CS,
TPAGER_LCD_PIN_CS
}
);
return std::make_shared<SpiSdCardDevice>(
std::move(configuration)
);
}