New board: CYD-E32R32P (#393)

This commit is contained in:
NellowTCS
2025-10-27 12:59:53 -06:00
committed by GitHub
parent 8115ca4fd9
commit 647678ff82
14 changed files with 297 additions and 2 deletions
@@ -0,0 +1,22 @@
#include "SdCard.h"
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
using tt::hal::sdcard::SpiSdCardDevice;
using SdCardDevice = tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
SD_CS_PIN, // CS pin (IO5 on the module)
GPIO_NUM_NC, // MOSI override: leave NC to use SPI host pins
GPIO_NUM_NC, // MISO override: leave NC
GPIO_NUM_NC, // SCLK override: leave NC
SdCardDevice::MountBehaviour::AtBoot,
std::make_shared<tt::Mutex>(tt::Mutex::Type::Recursive),
std::vector<gpio_num_t>(),
SD_SPI_HOST // SPI host for SD card (SPI3_HOST)
);
return std::make_shared<SpiSdCardDevice>(
std::move(configuration)
);
}