Device migrations, new drivers, cleanup (#567)
* **New Features** * Added native display support for ST7796, ILI9341, and ST7789 panels across supported boards. * Added FT5x06 and FT6x36 touchscreen support. * Generic PWM driver * ESP32 PWM driver * Generic RGB LED driver * RGB PWM LED driver * RGB GPIO LED driver * Implementation of RGB LED for various boards * **Improvements** * Updated board hardware descriptions to use explicit display/touch/backlight device-tree bindings and disabled deprecated HAL usage. * Improved display and touch-driver cleanup to prevent stale resources and improve shutdown reliability. * Pinned esp-hosted library to a fixed version * **Deletions** * Obsolete placeholder display * Legacy ILI9488 support. * ESP32-specific LEDC PWM implementation
This commit is contained in:
committed by
GitHub
parent
6fb2bb736c
commit
3b5a401594
@@ -165,20 +165,26 @@ static error_t start(Device* device) {
|
||||
static error_t stop(Device* device) {
|
||||
auto* internal = static_cast<Ili9341Internal*>(device_get_driver_data(device));
|
||||
|
||||
error_t result = ERROR_NONE;
|
||||
|
||||
if (esp_lcd_panel_del(internal->panel_handle) != ESP_OK) {
|
||||
LOG_E(TAG, "Failed to delete panel");
|
||||
result = ERROR_RESOURCE;
|
||||
if (internal->panel_handle != nullptr) {
|
||||
if (esp_lcd_panel_del(internal->panel_handle) != ESP_OK) {
|
||||
LOG_E(TAG, "Failed to delete panel");
|
||||
return ERROR_RESOURCE;
|
||||
}
|
||||
internal->panel_handle = nullptr;
|
||||
}
|
||||
if (esp_lcd_panel_io_del(internal->io_handle) != ESP_OK) {
|
||||
LOG_E(TAG, "Failed to delete panel IO");
|
||||
result = ERROR_RESOURCE;
|
||||
|
||||
if (internal->io_handle != nullptr) {
|
||||
if (esp_lcd_panel_io_del(internal->io_handle) != ESP_OK) {
|
||||
LOG_E(TAG, "Failed to delete panel IO");
|
||||
return ERROR_RESOURCE;
|
||||
}
|
||||
internal->io_handle = nullptr;
|
||||
}
|
||||
|
||||
vSemaphoreDelete(internal->draw_done_semaphore);
|
||||
free(internal);
|
||||
return result;
|
||||
device_set_driver_data(device, nullptr);
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
Reference in New Issue
Block a user