Merge develop into main (#316)

- Updated all boards to use `hal::Configuration.createDevices`
- Updated all boards to use new directory structure and file naming convention
- Refactored `Xpt2046SoftSpi` driver.
- Created `Axp2101Power` device in `Drivers/AXP2101`
- Removed global static instances from some drivers (instances that kept a reference to the Device*)
- Improved `SystemInfoApp` UI: better memory labels, hide external memory bar when there's no PSRAM
- Fix for HAL: register touch devices after displays are registered
- Fix for Boot splash hanging on WiFi init: unlock file lock after using it
This commit is contained in:
Ken Van Hoeylandt
2025-09-03 22:05:28 +02:00
committed by GitHub
parent 1deaf4c426
commit 1627b9fa85
135 changed files with 543 additions and 577 deletions
+12 -9
View File
@@ -1,18 +1,16 @@
#include "JC2432W328C.h"
#include "hal/YellowDisplay.h"
#include "hal/YellowDisplayConstants.h"
#include "hal/YellowSdCard.h"
#include "devices/Display.h"
#include "devices/SdCard.h"
#include <Tactility/lvgl/LvglSync.h>
#include <PwmBacklight.h>
#include <Tactility/hal/Configuration.h>
#include <Tactility/lvgl/LvglSync.h>
using namespace tt::hal;
#define CYD_SPI_TRANSFER_SIZE_LIMIT (JC2432W328C_LCD_DRAW_BUFFER_SIZE * LV_COLOR_DEPTH / 8)
bool initBoot() {
static bool initBoot() {
//Set the RGB Led Pins to output and turn them off
ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT)); //Red
ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_16, GPIO_MODE_OUTPUT)); //Green
@@ -26,11 +24,16 @@ bool initBoot() {
return driver::pwmbacklight::init(JC2432W328C_LCD_PIN_BACKLIGHT);
}
static DeviceVector createDevices() {
return {
createDisplay(),
createSdCard()
};
}
const Configuration cyd_jc2432w328c_config = {
.initBoot = initBoot,
.createDisplay = createDisplay,
.sdcard = createYellowSdCard(),
.power = nullptr,
.createDevices = createDevices,
.i2c = {
//Touch
i2c::Configuration {
@@ -1,9 +1,8 @@
#include "YellowDisplay.h"
#include "Cst816Touch.h"
#include "YellowDisplayConstants.h"
#include "Display.h"
#include <St7789Display.h>
#include <Cst816Touch.h>
#include <PwmBacklight.h>
#include <St7789Display.h>
static std::shared_ptr<tt::hal::touch::TouchDevice> createTouch() {
auto configuration = std::make_unique<Cst816sTouch::Configuration>(
@@ -1,5 +1,8 @@
#pragma once
#include "Tactility/hal/display/DisplayDevice.h"
#include <memory>
// Display backlight (PWM)
#define JC2432W328C_LCD_PIN_BACKLIGHT GPIO_NUM_27
@@ -12,3 +15,4 @@
#define JC2432W328C_LCD_PIN_CS GPIO_NUM_15
#define JC2432W328C_LCD_PIN_DC GPIO_NUM_2
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay();
@@ -1,6 +1,4 @@
#include "YellowSdCard.h"
#define TAG "jc2432w328c_sdcard"
#include "SdCard.h"
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
#include <Tactility/lvgl/LvglSync.h>
@@ -10,7 +8,7 @@ constexpr auto SDCARD_PIN_CS = GPIO_NUM_5;
using tt::hal::sdcard::SpiSdCardDevice;
std::shared_ptr<SdCardDevice> createYellowSdCard() {
std::shared_ptr<SdCardDevice> createSdCard() {
auto configuration = std::make_unique<SpiSdCardDevice::Config>(
SDCARD_PIN_CS,
GPIO_NUM_NC,
@@ -4,5 +4,5 @@
using tt::hal::sdcard::SdCardDevice;
std::shared_ptr<SdCardDevice> createYellowSdCard();
std::shared_ptr<SdCardDevice> createSdCard();
@@ -1,6 +0,0 @@
#pragma once
#include "Tactility/hal/display/DisplayDevice.h"
#include <memory>
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay();