|
| 1 | +Based on https://github.com/lovyan03/LovyanGFX/tree/bus-s3-rgb |
| 2 | +Only for develop branch |
| 3 | + |
| 4 | +diff --git a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp |
| 5 | +index 93db22d..28ed755 100644 |
| 6 | +--- a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp |
| 7 | ++++ b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp |
| 8 | +@@ -44,6 +44,13 @@ Contributors: |
| 9 | + #include <driver/periph_ctrl.h> |
| 10 | + #endif |
| 11 | + |
| 12 | ++#if SOC_LCDCAM_RGB_LCD_SUPPORTED || CONFIG_SOC_LCDCAM_RGB_LCD_SUPPORTED || (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)) |
| 13 | ++ // lcd_periph_signals() function was renamed to lcd_periph_rgb_signals() |
| 14 | ++ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_rgb_signals |
| 15 | ++#else |
| 16 | ++ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_signals |
| 17 | ++#endif |
| 18 | ++ |
| 19 | + namespace lgfx |
| 20 | + { |
| 21 | + inline namespace v1 |
| 22 | +@@ -156,7 +163,7 @@ namespace lgfx |
| 23 | + static constexpr const uint8_t rgb332sig_tbl[] = { 1, 0, 1, 0, 1, 2, 3, 4, 2, 3, 4, 5, 6, 5, 6, 7 }; |
| 24 | + static constexpr const uint8_t rgb565sig_tbl[] = { 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7 }; |
| 25 | + auto tbl = (pixel_bytes == 2) ? rgb565sig_tbl : rgb332sig_tbl; |
| 26 | +- auto sigs = lcd_periph_signals.panels[_cfg.port]; |
| 27 | ++ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port]; |
| 28 | + for (size_t i = 0; i < 16; i++) { |
| 29 | + _gpio_pin_sig(_cfg.pin_data[i], sigs.data_sigs[tbl[i]]); |
| 30 | + } |
| 31 | +@@ -304,7 +311,8 @@ namespace lgfx |
| 32 | + dev->lc_dma_int_ena.val = 1; |
| 33 | + |
| 34 | + int isr_flags = ESP_INTR_FLAG_INTRDISABLED | ESP_INTR_FLAG_SHARED; |
| 35 | +- esp_intr_alloc_intrstatus(lcd_periph_signals.panels[_cfg.port].irq_id, isr_flags, |
| 36 | ++ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port]; |
| 37 | ++ esp_intr_alloc_intrstatus(sigs.irq_id, isr_flags, |
| 38 | + (uint32_t)&dev->lc_dma_int_st, |
| 39 | + LCD_LL_EVENT_VSYNC_END, lcd_default_isr_handler, this, &_intr_handle); |
| 40 | + esp_intr_enable(_intr_handle); |
0 commit comments