Skip to content

0.2.20#190

Merged
lovyan03 merged 38 commits intomasterfrom
develop
Apr 21, 2026
Merged

0.2.20#190
lovyan03 merged 38 commits intomasterfrom
develop

Conversation

@lovyan03
Copy link
Copy Markdown
Collaborator

  • add support PaperColor
  • add support lvgl fonts

lovyan03 and others added 30 commits January 28, 2026 17:26
compilation across ESP32/S3/C3/C6/H2/P4 targets with
Arduino-ESP32 v2/v3 and ESP-IDF v5.1/v5.3.
Add additional colors including gray/grey variations and complete col…
…d manager

- Remove M5Stack-specific board definitions (m5stack_core, m5stack_core2,
  m5stack_cores3) from Espressif package since M5GFX uses runtime detection
- Simplify matrix to SoC types only (ESP32, ESP32-S3, ESP32-C3, C6, P4, H2)
- Add M5Stack official board manager tests (M5Core, M5CoreS3) for
  compatibility verification with both v2.x and v3.x releases
- Make board_manager_url a matrix variable for flexibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use correct board IDs from boards.txt (m5stack_core, m5stack_cores3)
instead of display names from package index (M5Core, M5CoreS3).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…Panel_EPD

Synced from LovyanGFX develop (c13b7a5). Adds -fomit-frame-pointer to the
optimize attribute of blit_dmabuf() to prevent "a7 cannot be used in asm here"
error in ESP-IDF builds. See LovyanGFX#820.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…upport

Replace version-based preprocessor detection (LGFX_GPIO_IN_SEL_CFG_REG)
with SFINAE type traits for GPIO func_in_sel_cfg/func_out_sel_cfg field
access. ESP-IDF renamed the struct fields from func_sel to in_sel/out_sel
in different patch versions per release branch (v5.1.7, v5.2.6, v5.3.4,
v5.4.2), making version-based detection unreliable. SFINAE detects the
actual struct layout at compile time, ensuring correct behavior across
all ESP-IDF versions and SoC targets.

Apply the same SFINAE approach for I2C bus_busy detection in Bus_I2C.cpp,
replacing chip-specific conditionals and i2c_ll dependency with compile-
time detection of status_reg vs sr member.

Add CONFIG_IDF_TARGET_ESP32H2 to GPIO single-bank access (common.hpp)
and I2C register access conditions (common.cpp).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…upport

Replace version-based preprocessor detection (LGFX_GPIO_IN_SEL_CFG_REG)
with SFINAE type traits for GPIO func_in_sel_cfg/func_out_sel_cfg field
access. ESP-IDF renamed the struct fields from func_sel to in_sel/out_sel
in different patch versions per release branch (v5.1.7, v5.2.6, v5.3.4,
v5.4.2), making version-based detection unreliable. SFINAE detects the
actual struct layout at compile time, ensuring correct behavior across
all ESP-IDF versions and SoC targets.

Apply the same SFINAE approach for I2C bus_busy detection in Bus_I2C.cpp,
replacing chip-specific conditionals with compile-time detection of
status_reg vs sr member.

Add CONFIG_IDF_TARGET_ESP32H2 to GPIO single-bank access (common.hpp)
and I2C register access conditions (common.cpp).

Add explicit ESP32-H2 branch in device.hpp to exclude Bus_Parallel8
(requires I2S, not available on H2). Guard soc/i2s_reg.h include with
__has_include in common.hpp for H2 compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ESP32-H2's spi_reg.h defines SPI register macros (SPI_CMD_REG, SPI_W0_REG, etc.)
without parameters using undefined DR_REG_SPI_BASE, while the codebase uses them
with a port parameter like SPI_W0_REG(spi_port). Redefine the 7 affected macros
as parameterized versions using REG_SPI_BASE(i) to resolve compilation errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CI and fix compile error
Signed-off-by: lbuque <1102390310@qq.com>
Add StampS3Bat and StampP4 board id.
Signed-off-by: lbuque <1102390310@qq.com>
Signed-off-by: lbuque <1102390310@qq.com>
Fix compilation errors when using it with lvgl.
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.
@lovyan03 lovyan03 merged commit d8074bb into master Apr 21, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants