Driver improvements (#535)

- New drivers:
  - SD SPI
  - spi_peripheral
  - touch_placeholder
  - display_placeholder
- Devicetree compiler:
  - Implement phandle-arrays
  - Implement device addresses
- Add placeholder drivers to all devices with a SPI display
- SPI driver: add `cs-pins` and set them to high on driver start
- FileSystem: add `file_system_set_owner()` and `file_system_get_owner()`
- File locking is now checking if the related `FileSystem` is part of a shared SPI bus
- Add `device_get_child_count()`
- SDMMC driver: Remove default of `slot` value
- Fix for Crowpanel Basic 3.5" display (add delay to booting)
- Fix for LilyGO T-HMI SD card mounting (delayed mounting by disabling it initially in the dts)
This commit is contained in:
Ken Van Hoeylandt
2026-06-27 17:32:05 +02:00
committed by GitHub
parent e50659a3fb
commit 599fa46766
222 changed files with 1713 additions and 2257 deletions
@@ -1,7 +1,5 @@
#include "devices/Display.h"
#include "devices/Power.h"
#include "devices/SdCard.h"
#include <driver/gpio.h>
#include <tactility/device.h>
#include <tactility/drivers/i2c_controller.h>
@@ -243,7 +241,6 @@ static DeviceVector createDevices() {
axp2101,
std::make_shared<Axp2101Power>(axp2101),
createPower(),
createSdCard(),
createDisplay(),
};
}
@@ -1,30 +0,0 @@
#include "SdCard.h"
#include <tactility/device.h>
#include <Tactility/lvgl/LvglSync.h>
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
constexpr auto STACKCHAN_SDCARD_PIN_CS = GPIO_NUM_4;
constexpr auto STACKCHAN_LCD_PIN_CS = GPIO_NUM_3;
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
STACKCHAN_SDCARD_PIN_CS,
GPIO_NUM_NC,
GPIO_NUM_NC,
GPIO_NUM_NC,
SdCardDevice::MountBehaviour::AtBoot,
tt::lvgl::getSyncLock(),
std::vector { STACKCHAN_LCD_PIN_CS }
);
auto* spi_controller = device_find_by_name("spi0");
check(spi_controller, "spi0 not found");
return std::make_shared<SpiSdCardDevice>(
std::move(configuration),
spi_controller
);
}
@@ -1,7 +0,0 @@
#pragma once
#include "Tactility/hal/sdcard/SdCardDevice.h"
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createSdCard();