Merged
Conversation
Apply two LovyanGFX develop commits that fix ESP32P4 SPI issues: - 16a37c7 Fix for #743 (ESP32P4 Bus_SPI stalling after 32 pixels) (#822) - cd4cd02 ESP32P4: Include DMA channel for link2 reg write (see #743) Both commits address the same root cause: ESP32P4 DMA/cache handling for SPI transfers. Files affected: Bus_SPI.cpp, Bus_SPI.hpp.
Apply LovyanGFX develop commits that add ESP-IDF v6 build support: - c9b05f7 feat: Update ESP-IDF and HAL for v6 compatibility (#831) - 72280f3 Attempt to fix [[noreturn]] compilation error with idfv6 + esp32p4 - eb3b405 [idf v6] Fix ledc_channel_config_t.intr_type deprecation warning Files touched: result.hpp, common.cpp, common.hpp, Bus_EPD.cpp, Bus_Parallel8.cpp/hpp, Bus_SPI.cpp/hpp, Light_PWM.cpp, esp32c3/Bus_Parallel8.cpp, esp32p4/Panel_DSI.cpp, esp32s2/Bus_Parallel16.cpp/hpp, Bus_Parallel8.cpp/hpp, esp32s3/Bus_Parallel16.cpp, Bus_Parallel8.cpp. Key changes (all guarded by ESP_IDF_VERSION checks, backward compatible): - Add i2s_port_t typedef compat for IDF v6 (where it was removed) - Include soc/gpio_reg.h, soc/gpio_periph.h, hal/gdma_ll.h where needed - gpio_matrix_out -> rom_gpio_matrix_out on IDF v6 - gpio_iomux_out -> gpio_iomux_output on IDF v6 - VSPI_HOST fallback to SPI3_HOST / SPI2_HOST when undefined - hal/gdma_channel.h fallback when soc/gdma_channel.h is absent - SOC_GDMA_PAIRS_PER_GROUP_MAX fallback via GDMA_LL_PAIRS_PER_INST - getPeriphModule return type switches to auto on C++14+ - periph_module_reset PERIPH_HSPI/VSPI_MODULE fallback - i2c_ll_reset_register detection relaxed for IDF v6 - ESP32P4 Bus_SPI: pragma diagnostic push/pop around hal headers - Light_PWM: guard ledc_channel_config_t.intr_type (deprecated on v6) For common.cpp/hpp specifically: investigation confirmed that M5GFX's independent SFINAE + ESP32-H2 work (586d60b and ff337c6) produced bit-identical content to the set of commits LovyanGFX landed separately (87915d6, 89c9be3, 318f82a, 338c593, bd8cdd5). The only real delta between the two sides for these two files was c9b05f7 itself.
Apply LovyanGFX develop commit: - 53f52c8 UTF8 decoding improvements by @d4rkmen (see #828) Rewrites LGFXBase::decodeUTF8 to add support for 4-byte UTF-8 sequences (21-bit code points, U+10000..U+10FFFF). The state machine is restructured into a switch on _decoderState with a new utf8_state3 entry added to utf8_decode_state_t. This change is disjoint from the loadFont() font_type extension already on M5GFX develop (f1de0e8) and merges cleanly with it. After this commit, LGFXBase.cpp/hpp are identical on both repos.
Backport the build fixes applied on the LovyanGFX side (develop 2e5119f) so the same code paths compile cleanly on M5GFX for environments that surfaced issues on a Seeed Wio Terminal (SAMD51, Arduino) build. 1. Arduino.h defines abs() as a preprocessor macro, which collides with std::abs used inside lgfx_fonts.cpp. Add abs to the existing min/max #undef block at the top of the file so std::abs resolves cleanly on every toolchain. 2. The switch on gd.format in LVGLfont::drawChar was guarded with #ifdef LV_FONT_GLYPH_FORMAT_A1 etc, but these identifiers are enum values defined in lv_font/font.h, not preprocessor macros - so the guards always evaluated false, every case body became unreachable, and glyph_bpp was never updated. Drop the broken #ifdef guards and use the enum labels directly. 3. fill_rect_radial_gradient / fill_rect_linear_gradient in LGFXBase compared int loop counters against uint32_t dimensions, producing -Wsign-compare warnings. Cast the upper bounds to int so the loop variables keep their signed type (leaving downstream x/y pushImage arithmetic unchanged).
The file(GLOB) used to enumerate both src/lgfx/Fonts/lvgl/lv_font_*.c (narrow) and src/lgfx/Fonts/lvgl/*.c (broad), matching the same set of files twice. Every .c file currently in that directory starts with lv_font_, so the narrow glob was a subset of the broad one. Keep the broad glob (to catch any future non-lv_font_ helper source added to the directory) and drop the redundant narrow one. Also reorder so that the Fonts/ entries are grouped in efont -> IPA -> lvgl order, matching the layout used on the LovyanGFX side.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces multiple compatibility and bugfix improvements for ESP32 platforms, especially targeting ESP-IDF v6, ESP32P4, and Arduino Core v6. The changes address GPIO and DMA handling, UTF-8 decoding, font rendering, and build configuration to ensure better support for new SDK versions and hardware targets.
Platform compatibility improvements:
Bus_Parallel8.cpp,Bus_SPI.cpp, and related headers to handle ESP-IDF v6 changes, ESP32P4 target, and new/renamed SDK APIs for GPIO and DMA operations. This includes new wrapper macros for GPIO matrix functions and proper header selection for I2S and GDMA. [1] [2] [3] [4]Light_PWM.cppto recognize and adapt to ESP32 Arduino Core v6, including disabling deprecated fields and updating feature macros. [1] [2]Bug fixes and code correctness:
LGFXBase.cpp. [1] [2]Bus_EPD.cppfor ESP-IDF compatibility.#include <driver/gpio.h>for non-Arduino builds inLight_PWM.cpp.Font rendering and UTF-8 handling:
LGFXBase.cppto support up to 4-byte sequences and fixed the state machine for multibyte characters. Added a new decode state for 4-byte UTF-8. [1] [2]#ifdefchecks for LVGL font glyph formats, as these are enum values, not macros, inlgfx_fonts.cpp.#undef absguard to avoid macro conflicts inlgfx_fonts.cpp.Build system and configuration:
CMakeLists.txtto include all LVGL font.cfiles.ESP32-specific enhancements:
common.cpp.