From 49af1d42f87df50614ba98be6f3ee56ca4535528 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 13 Jul 2026 23:58:14 +0200 Subject: [PATCH] Fixes and improvements --- .../platform-esp32/include/tactility/drivers/esp32_i8080.h | 5 +++++ Platforms/platform-esp32/source/drivers/esp32_i8080.cpp | 7 +++++++ .../Tactility/app/touchcalibration/TouchCalibration.h | 2 ++ TactilityKernel/source/drivers/gpio_hog.cpp | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Platforms/platform-esp32/include/tactility/drivers/esp32_i8080.h b/Platforms/platform-esp32/include/tactility/drivers/esp32_i8080.h index b2bdf62e0..997b6be9a 100644 --- a/Platforms/platform-esp32/include/tactility/drivers/esp32_i8080.h +++ b/Platforms/platform-esp32/include/tactility/drivers/esp32_i8080.h @@ -1,6 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once +#include +#if SOC_LCD_I80_SUPPORTED + #include #include @@ -53,3 +56,5 @@ error_t esp32_i8080_get_bus_handle(struct Device* child_device, esp_lcd_i80_bus_ #ifdef __cplusplus } #endif + +#endif // SOC_LCD_I80_SUPPORTED diff --git a/Platforms/platform-esp32/source/drivers/esp32_i8080.cpp b/Platforms/platform-esp32/source/drivers/esp32_i8080.cpp index 121e35051..9af6f3123 100644 --- a/Platforms/platform-esp32/source/drivers/esp32_i8080.cpp +++ b/Platforms/platform-esp32/source/drivers/esp32_i8080.cpp @@ -1,4 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 +#include +#if SOC_LCD_I80_SUPPORTED + #include #include #include @@ -130,6 +133,8 @@ static error_t start(Device* device) { gpio_descriptor_set_flags(desc, GPIO_FLAG_DIRECTION_OUTPUT); gpio_descriptor_set_level(desc, true); data->cs_descriptors.push_back(desc); + } else { + LOG_E(TAG, "Failed to acquire CS pin %u", i); } } @@ -183,3 +188,5 @@ Driver esp32_i8080_driver = { }; } // extern "C" + +#endif // SOC_LCD_I80_SUPPORTED diff --git a/Tactility/Include/Tactility/app/touchcalibration/TouchCalibration.h b/Tactility/Include/Tactility/app/touchcalibration/TouchCalibration.h index 6a85b6041..5c8dce48f 100644 --- a/Tactility/Include/Tactility/app/touchcalibration/TouchCalibration.h +++ b/Tactility/Include/Tactility/app/touchcalibration/TouchCalibration.h @@ -1,6 +1,8 @@ #pragma once +#ifdef ESP_PLATFORM #include +#endif #if defined(CONFIG_TT_TOUCH_CALIBRATION_SUPPORTED) diff --git a/TactilityKernel/source/drivers/gpio_hog.cpp b/TactilityKernel/source/drivers/gpio_hog.cpp index 37fbbde38..28b15ca01 100644 --- a/TactilityKernel/source/drivers/gpio_hog.cpp +++ b/TactilityKernel/source/drivers/gpio_hog.cpp @@ -12,7 +12,7 @@ #define GET_CONFIG(device) (static_cast((device)->config)) namespace { -const struct DeviceType GPIO_HOG_TYPE { .name = "gpio_hog" }; +const DeviceType GPIO_HOG_TYPE { .name = "gpio_hog" }; } static error_t start(Device* device) {