mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 17:20:01 +00:00
41 lines
1.8 KiB
Diff
41 lines
1.8 KiB
Diff
Based on https://github.com/lovyan03/LovyanGFX/tree/bus-s3-rgb
|
|
Only for develop branch
|
|
|
|
diff --git a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
|
|
index 93db22d..28ed755 100644
|
|
--- a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
|
|
+++ b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
|
|
@@ -44,6 +44,13 @@ Contributors:
|
|
#include <driver/periph_ctrl.h>
|
|
#endif
|
|
|
|
+#if SOC_LCDCAM_RGB_LCD_SUPPORTED || CONFIG_SOC_LCDCAM_RGB_LCD_SUPPORTED || (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0))
|
|
+ // lcd_periph_signals() function was renamed to lcd_periph_rgb_signals()
|
|
+ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_rgb_signals
|
|
+#else
|
|
+ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_signals
|
|
+#endif
|
|
+
|
|
namespace lgfx
|
|
{
|
|
inline namespace v1
|
|
@@ -156,7 +163,7 @@ namespace lgfx
|
|
static constexpr const uint8_t rgb332sig_tbl[] = { 1, 0, 1, 0, 1, 2, 3, 4, 2, 3, 4, 5, 6, 5, 6, 7 };
|
|
static constexpr const uint8_t rgb565sig_tbl[] = { 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7 };
|
|
auto tbl = (pixel_bytes == 2) ? rgb565sig_tbl : rgb332sig_tbl;
|
|
- auto sigs = lcd_periph_signals.panels[_cfg.port];
|
|
+ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port];
|
|
for (size_t i = 0; i < 16; i++) {
|
|
_gpio_pin_sig(_cfg.pin_data[i], sigs.data_sigs[tbl[i]]);
|
|
}
|
|
@@ -304,7 +311,8 @@ namespace lgfx
|
|
dev->lc_dma_int_ena.val = 1;
|
|
|
|
int isr_flags = ESP_INTR_FLAG_INTRDISABLED | ESP_INTR_FLAG_SHARED;
|
|
- esp_intr_alloc_intrstatus(lcd_periph_signals.panels[_cfg.port].irq_id, isr_flags,
|
|
+ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port];
|
|
+ esp_intr_alloc_intrstatus(sigs.irq_id, isr_flags,
|
|
(uint32_t)&dev->lc_dma_int_st,
|
|
LCD_LL_EVENT_VSYNC_END, lcd_default_isr_handler, this, &_intr_handle);
|
|
esp_intr_enable(_intr_handle);
|