Implement device: CYD-2432S024R (#521)

This commit is contained in:
NellowTCS
2026-04-13 12:59:15 -06:00
committed by GitHub
parent 10ba4f58e2
commit be2cdc0b90
11 changed files with 222 additions and 0 deletions
@@ -0,0 +1,23 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.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,
nullptr,
std::vector<gpio_num_t>(),
SPI3_HOST
);
auto* spi_controller = device_find_by_name("spi1");
check(spi_controller, "spi1 not found");
return std::make_shared<SpiSdCardDevice>(std::move(config), spi_controller);
}