Skip to content

hotfix to solve esp-idf 5.3 compatibily with ESP32-C3#197

Open
siteswapjuggler wants to merge 1 commit into
someweisguy:release/v4.1from
siteswapjuggler:hotfix/esp-idf5.3-compat
Open

hotfix to solve esp-idf 5.3 compatibily with ESP32-C3#197
siteswapjuggler wants to merge 1 commit into
someweisguy:release/v4.1from
siteswapjuggler:hotfix/esp-idf5.3-compat

Conversation

@siteswapjuggler
Copy link
Copy Markdown

Fix compatibility with ESP-IDF >= 5.3

ESP-IDF 5.3 removed the module field from uart_signal_conn_t. This patch replaces it with a version-safe reference to PERIPH_UARTx_MODULE which seems to have been normalised in the new ESP-IDF iteration.

Conditionnal MACRO are use to keep compatibility with both ESP-IDF 5.1 and 5.3.

Tested with:

  • ESP-IDF 5.1.4 (ESP32-C3)
  • ESP-IDF 5.3.0 (ESP32-C3)

Comment thread src/dmx/hal/uart.c
struct dmx_uart_t *uart = &dmx_uart_context[dmx_num];
if (uart->num != 0) { // Default UART port for console
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
periph_module_disable(PERIPH_UART1_MODULE+dmx_num);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is different from the rest. Shouldn't is just use PERIPH_UART0_MODULE+uart->num to be consistent with the variant below?

@Florida-Rob
Copy link
Copy Markdown

Florida-Rob commented Jul 25, 2025 via email

@septatrix
Copy link
Copy Markdown

I don’t know which code you are comparing to, did you see the latest I relezsed to support 5.3 and 5.4 ?

The first change (replacing enum member with define) is already included in the latest release but the other change (replacing the .module strut access) is still needed for me to successfully compile

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.

3 participants