IDF release/v5.5 (#11504)

* IDF release/v5.5 4c3d086c

* fix(prov): Enable BLE provisioning with NimBLE

* fix(uart): idf 5.5 new gpio_iomux_* functions (#11507)

* fix(uart): idf 5.5 new gpio_iomux_* functions

* fix(uart): formatting and style

* fix(uart): commentaries style fix

* fix(uart): commentaries style fix

* fix(uart): commentaries style fix

* fix(uart): support to any idf 5.x version

* fix(uart): changing assert in order to avoid reset

* ci(pre-commit): Apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>

* IDF release/v5.5 cbe9388f

---------

Co-authored-by: Sugar Glider <rodrigo.garcia@espressif.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
Me No Dev 2025-06-24 12:30:29 +03:00 committed by GitHub
parent 18c909a8fd
commit 36d049659b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 62 additions and 51 deletions

View file

@ -317,13 +317,24 @@ static bool _uartTrySetIomuxPin(uart_port_t uart_num, int io_num, uint32_t idx)
}
// Assign the correct function to the GPIO.
assert(upin->iomux_func != -1);
if (upin->iomux_func == -1) {
log_e("IO#%d has bad IOMUX internal information. Switching to GPIO Matrix UART function.", io_num);
return false;
}
if (uart_num < SOC_UART_HP_NUM) {
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
if (upin->input) {
gpio_iomux_input(io_num, upin->iomux_func, upin->signal);
} else {
gpio_iomux_output(io_num, upin->iomux_func);
}
#else
gpio_iomux_out(io_num, upin->iomux_func, false);
// If the pin is input, we also have to redirect the signal, in order to bypass the GPIO matrix.
if (upin->input) {
gpio_iomux_in(io_num, upin->signal);
}
#endif
}
#if (SOC_UART_LP_NUM >= 1) && (SOC_RTCIO_PIN_COUNT >= 1)
else {
@ -1276,11 +1287,11 @@ bool uartSetClockSource(uint8_t uartNum, uart_sclk_t clkSrc) {
#if SOC_UART_LP_NUM >= 1
if (uart->num >= SOC_UART_HP_NUM) {
switch (clkSrc) {
case UART_SCLK_XTAL: uart->_uart_clock_source = LP_UART_SCLK_XTAL_D2; break;
case UART_SCLK_XTAL: uart->_uart_clock_source = LP_UART_SCLK_XTAL_D2; break;
#if CONFIG_IDF_TARGET_ESP32C5
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_RC_FAST; break;
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_RC_FAST; break;
#else
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_LP_FAST; break;
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_LP_FAST; break;
#endif
case UART_SCLK_DEFAULT:
default: uart->_uart_clock_source = LP_UART_SCLK_DEFAULT;

View file

@ -62,7 +62,7 @@ void setup() {
WiFi.onEvent(SysProvEvent);
// BLE Provisioning using the ESP SoftAP Prov works fine for any BLE SoC, including ESP32, ESP32S3 and ESP32C3.
#if CONFIG_BLUEDROID_ENABLED && !defined(USE_SOFT_AP)
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h") && !defined(USE_SOFT_AP)
Serial.println("Begin Provisioning using BLE");
// Sample uuid that user can pass during provisioning using BLE
uint8_t uuid[16] = {0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02};

View file

@ -34,7 +34,7 @@
#endif
#include <nvs_flash.h>
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
#include "network_provisioning/scheme_ble.h"
#endif
#include <network_provisioning/scheme_softap.h>
@ -47,7 +47,7 @@
bool wifiLowLevelInit(bool persistent);
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
static const uint8_t custom_service_uuid[16] = {
0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02,
};
@ -61,13 +61,13 @@ static void get_device_service_name(prov_scheme_t prov_scheme, char *service_nam
log_e("esp_wifi_get_mac failed!");
return;
}
#if CONFIG_IDF_TARGET_ESP32 && defined(CONFIG_BLUEDROID_ENABLED)
#if CONFIG_IDF_TARGET_ESP32 && (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
snprintf(service_name, max, "%s%02X%02X%02X", SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
} else {
#endif
snprintf(service_name, max, "%s%02X%02X%02X", SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
#if CONFIG_IDF_TARGET_ESP32 && defined(CONFIG_BLUEDROID_ENABLED)
#if CONFIG_IDF_TARGET_ESP32 && (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
}
#endif
}
@ -78,20 +78,20 @@ void WiFiProvClass ::initProvision(prov_scheme_t prov_scheme, scheme_handler_t s
return;
}
network_prov_mgr_config_t config;
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
config.scheme = network_prov_scheme_ble;
} else {
#endif
config.scheme = network_prov_scheme_softap;
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
}
if (scheme_handler == NETWORK_PROV_SCHEME_HANDLER_NONE) {
#endif
network_prov_event_handler_t scheme_event_handler = NETWORK_PROV_EVENT_HANDLER_NONE;
memcpy(&config.scheme_event_handler, &scheme_event_handler, sizeof(network_prov_event_handler_t));
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
} else if (scheme_handler == NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM) {
network_prov_event_handler_t scheme_event_handler = NETWORK_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BTDM;
memcpy(&config.scheme_event_handler, &scheme_event_handler, sizeof(network_prov_event_handler_t));
@ -133,7 +133,7 @@ void WiFiProvClass ::beginProvision(
}
static char service_name_temp[32];
if (provisioned == false) {
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
service_key = NULL;
if (uuid == NULL) {
@ -148,7 +148,7 @@ void WiFiProvClass ::beginProvision(
service_name = (const char *)service_name_temp;
}
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
log_i("Starting AP using BLE. service_name : %s, pop : %s", service_name, pop);
} else {
@ -158,7 +158,7 @@ void WiFiProvClass ::beginProvision(
} else {
log_i("Starting provisioning AP using SOFTAP. service_name : %s, password : %s, pop : %s", service_name, service_key, pop);
}
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
}
#endif
if (network_prov_mgr_start_provisioning(security, pop, service_name, service_key) != ESP_OK) {

View file

@ -29,7 +29,7 @@
//Select the scheme using which you want to provision
typedef enum {
NETWORK_PROV_SCHEME_SOFTAP,
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
NETWORK_PROV_SCHEME_BLE,
#endif
NETWORK_PROV_SCHEME_MAX
@ -37,7 +37,7 @@ typedef enum {
typedef enum {
NETWORK_PROV_SCHEME_HANDLER_NONE,
#if CONFIG_BLUEDROID_ENABLED
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM,
NETWORK_PROV_SCHEME_HANDLER_FREE_BLE,
NETWORK_PROV_SCHEME_HANDLER_FREE_BT,

View file

@ -51,7 +51,7 @@
{
"packager": "esp32",
"name": "esp32-arduino-libs",
"version": "idf-release_v5.5-28ac0243-v1"
"version": "idf-release_v5.5-cbe9388f-v1"
},
{
"packager": "esp32",
@ -104,63 +104,63 @@
"tools": [
{
"name": "esp32-arduino-libs",
"version": "idf-release_v5.5-28ac0243-v1",
"version": "idf-release_v5.5-cbe9388f-v1",
"systems": [
{
"host": "i686-mingw32",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
},
{
"host": "x86_64-mingw32",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
},
{
"host": "arm64-apple-darwin",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
},
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
"size": "405149394"
"url": "https://github.com/espressif/esp32-arduino-lib-builder/releases/download/idf-release_v5.5/esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
"size": "421300036"
}
]
},