mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
- Implemented [unPhone](https://unphone.net/) v9 board - Updated `.clang-format` to better reflect the intended code style - Fix SD card compatibility issues for all boards (frequency wasn't set well) - Moved `I2cDevice` class from CoreS3 board project to TactilityHeadless project - Tactility configuration now has default empty lists for apps and services fields - Fix for Launcher app: we don't need padding when showing it vertically - Fix for I2cDevice read/write calls that checked for `esp_err_t` instead of `bool` - Fix for TinyUSB init that checked for `esp_err_t` instead of `bool`
33 lines
775 B
C++
33 lines
775 B
C++
#include "CoreS3SdCard.h"
|
|
|
|
#include "lvgl/LvglSync.h"
|
|
#include "hal/SpiSdCard.h"
|
|
|
|
#include <esp_vfs_fat.h>
|
|
|
|
#define CORES3_SDCARD_SPI_FREQUENCY 20000000U
|
|
#define CORES3_SDCARD_PIN_CS GPIO_NUM_4
|
|
#define CORES3_LCD_PIN_CS GPIO_NUM_3
|
|
|
|
std::shared_ptr<SdCard> createSdCard() {
|
|
auto* configuration = new tt::hal::SpiSdCard::Config(
|
|
CORES3_SDCARD_SPI_FREQUENCY,
|
|
CORES3_SDCARD_PIN_CS,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
GPIO_NUM_NC,
|
|
SdCard::MountBehaviour::AtBoot,
|
|
tt::lvgl::getLvglSyncLockable(),
|
|
{
|
|
CORES3_LCD_PIN_CS
|
|
},
|
|
SPI3_HOST
|
|
);
|
|
|
|
auto* sdcard = (SdCard*) new SpiSdCard(
|
|
std::unique_ptr<SpiSdCard::Config>(configuration)
|
|
);
|
|
|
|
return std::shared_ptr<SdCard>(sdcard);
|
|
}
|