Skip to content

Commit 36d0496

Browse files
me-no-devSuGliderpre-commit-ci-lite[bot]
authored
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>
1 parent 18c909a commit 36d0496

File tree

5 files changed

+62
-51
lines changed

5 files changed

+62
-51
lines changed

cores/esp32/esp32-hal-uart.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,24 @@ static bool _uartTrySetIomuxPin(uart_port_t uart_num, int io_num, uint32_t idx)
317317
}
318318

319319
// Assign the correct function to the GPIO.
320-
assert(upin->iomux_func != -1);
320+
if (upin->iomux_func == -1) {
321+
log_e("IO#%d has bad IOMUX internal information. Switching to GPIO Matrix UART function.", io_num);
322+
return false;
323+
}
321324
if (uart_num < SOC_UART_HP_NUM) {
325+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
326+
if (upin->input) {
327+
gpio_iomux_input(io_num, upin->iomux_func, upin->signal);
328+
} else {
329+
gpio_iomux_output(io_num, upin->iomux_func);
330+
}
331+
#else
322332
gpio_iomux_out(io_num, upin->iomux_func, false);
323333
// If the pin is input, we also have to redirect the signal, in order to bypass the GPIO matrix.
324334
if (upin->input) {
325335
gpio_iomux_in(io_num, upin->signal);
326336
}
337+
#endif
327338
}
328339
#if (SOC_UART_LP_NUM >= 1) && (SOC_RTCIO_PIN_COUNT >= 1)
329340
else {
@@ -1276,11 +1287,11 @@ bool uartSetClockSource(uint8_t uartNum, uart_sclk_t clkSrc) {
12761287
#if SOC_UART_LP_NUM >= 1
12771288
if (uart->num >= SOC_UART_HP_NUM) {
12781289
switch (clkSrc) {
1279-
case UART_SCLK_XTAL: uart->_uart_clock_source = LP_UART_SCLK_XTAL_D2; break;
1290+
case UART_SCLK_XTAL: uart->_uart_clock_source = LP_UART_SCLK_XTAL_D2; break;
12801291
#if CONFIG_IDF_TARGET_ESP32C5
1281-
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_RC_FAST; break;
1292+
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_RC_FAST; break;
12821293
#else
1283-
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_LP_FAST; break;
1294+
case UART_SCLK_RTC: uart->_uart_clock_source = LP_UART_SCLK_LP_FAST; break;
12841295
#endif
12851296
case UART_SCLK_DEFAULT:
12861297
default: uart->_uart_clock_source = LP_UART_SCLK_DEFAULT;

libraries/WiFiProv/examples/WiFiProv/WiFiProv.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void setup() {
6262
WiFi.onEvent(SysProvEvent);
6363

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

libraries/WiFiProv/src/WiFiProv.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#endif
3535

3636
#include <nvs_flash.h>
37-
#if CONFIG_BLUEDROID_ENABLED
37+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
3838
#include "network_provisioning/scheme_ble.h"
3939
#endif
4040
#include <network_provisioning/scheme_softap.h>
@@ -47,7 +47,7 @@
4747

4848
bool wifiLowLevelInit(bool persistent);
4949

50-
#if CONFIG_BLUEDROID_ENABLED
50+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
5151
static const uint8_t custom_service_uuid[16] = {
5252
0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02,
5353
};
@@ -61,13 +61,13 @@ static void get_device_service_name(prov_scheme_t prov_scheme, char *service_nam
6161
log_e("esp_wifi_get_mac failed!");
6262
return;
6363
}
64-
#if CONFIG_IDF_TARGET_ESP32 && defined(CONFIG_BLUEDROID_ENABLED)
64+
#if CONFIG_IDF_TARGET_ESP32 && (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
6565
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
6666
snprintf(service_name, max, "%s%02X%02X%02X", SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
6767
} else {
6868
#endif
6969
snprintf(service_name, max, "%s%02X%02X%02X", SERV_NAME_PREFIX_PROV, eth_mac[3], eth_mac[4], eth_mac[5]);
70-
#if CONFIG_IDF_TARGET_ESP32 && defined(CONFIG_BLUEDROID_ENABLED)
70+
#if CONFIG_IDF_TARGET_ESP32 && (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
7171
}
7272
#endif
7373
}
@@ -78,20 +78,20 @@ void WiFiProvClass ::initProvision(prov_scheme_t prov_scheme, scheme_handler_t s
7878
return;
7979
}
8080
network_prov_mgr_config_t config;
81-
#if CONFIG_BLUEDROID_ENABLED
81+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
8282
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
8383
config.scheme = network_prov_scheme_ble;
8484
} else {
8585
#endif
8686
config.scheme = network_prov_scheme_softap;
87-
#if CONFIG_BLUEDROID_ENABLED
87+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
8888
}
8989

9090
if (scheme_handler == NETWORK_PROV_SCHEME_HANDLER_NONE) {
9191
#endif
9292
network_prov_event_handler_t scheme_event_handler = NETWORK_PROV_EVENT_HANDLER_NONE;
9393
memcpy(&config.scheme_event_handler, &scheme_event_handler, sizeof(network_prov_event_handler_t));
94-
#if CONFIG_BLUEDROID_ENABLED
94+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
9595
} else if (scheme_handler == NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM) {
9696
network_prov_event_handler_t scheme_event_handler = NETWORK_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BTDM;
9797
memcpy(&config.scheme_event_handler, &scheme_event_handler, sizeof(network_prov_event_handler_t));
@@ -133,7 +133,7 @@ void WiFiProvClass ::beginProvision(
133133
}
134134
static char service_name_temp[32];
135135
if (provisioned == false) {
136-
#if CONFIG_BLUEDROID_ENABLED
136+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
137137
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
138138
service_key = NULL;
139139
if (uuid == NULL) {
@@ -148,7 +148,7 @@ void WiFiProvClass ::beginProvision(
148148
service_name = (const char *)service_name_temp;
149149
}
150150

151-
#if CONFIG_BLUEDROID_ENABLED
151+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
152152
if (prov_scheme == NETWORK_PROV_SCHEME_BLE) {
153153
log_i("Starting AP using BLE. service_name : %s, pop : %s", service_name, pop);
154154
} else {
@@ -158,7 +158,7 @@ void WiFiProvClass ::beginProvision(
158158
} else {
159159
log_i("Starting provisioning AP using SOFTAP. service_name : %s, password : %s, pop : %s", service_name, service_key, pop);
160160
}
161-
#if CONFIG_BLUEDROID_ENABLED
161+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
162162
}
163163
#endif
164164
if (network_prov_mgr_start_provisioning(security, pop, service_name, service_key) != ESP_OK) {

libraries/WiFiProv/src/WiFiProv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
//Select the scheme using which you want to provision
3030
typedef enum {
3131
NETWORK_PROV_SCHEME_SOFTAP,
32-
#if CONFIG_BLUEDROID_ENABLED
32+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
3333
NETWORK_PROV_SCHEME_BLE,
3434
#endif
3535
NETWORK_PROV_SCHEME_MAX
3636
} prov_scheme_t;
3737

3838
typedef enum {
3939
NETWORK_PROV_SCHEME_HANDLER_NONE,
40-
#if CONFIG_BLUEDROID_ENABLED
40+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
4141
NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM,
4242
NETWORK_PROV_SCHEME_HANDLER_FREE_BLE,
4343
NETWORK_PROV_SCHEME_HANDLER_FREE_BT,

package/package_esp32_index.template.json

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
{
5252
"packager": "esp32",
5353
"name": "esp32-arduino-libs",
54-
"version": "idf-release_v5.5-28ac0243-v1"
54+
"version": "idf-release_v5.5-cbe9388f-v1"
5555
},
5656
{
5757
"packager": "esp32",
@@ -104,63 +104,63 @@
104104
"tools": [
105105
{
106106
"name": "esp32-arduino-libs",
107-
"version": "idf-release_v5.5-28ac0243-v1",
107+
"version": "idf-release_v5.5-cbe9388f-v1",
108108
"systems": [
109109
{
110110
"host": "i686-mingw32",
111-
"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",
112-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
113-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
114-
"size": "405149394"
111+
"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",
112+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
113+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
114+
"size": "421300036"
115115
},
116116
{
117117
"host": "x86_64-mingw32",
118-
"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",
119-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
120-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
121-
"size": "405149394"
118+
"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",
119+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
120+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
121+
"size": "421300036"
122122
},
123123
{
124124
"host": "arm64-apple-darwin",
125-
"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",
126-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
127-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
128-
"size": "405149394"
125+
"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",
126+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
127+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
128+
"size": "421300036"
129129
},
130130
{
131131
"host": "x86_64-apple-darwin",
132-
"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",
133-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
134-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
135-
"size": "405149394"
132+
"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",
133+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
134+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
135+
"size": "421300036"
136136
},
137137
{
138138
"host": "x86_64-pc-linux-gnu",
139-
"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",
140-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
141-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
142-
"size": "405149394"
139+
"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",
140+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
141+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
142+
"size": "421300036"
143143
},
144144
{
145145
"host": "i686-pc-linux-gnu",
146-
"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",
147-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
148-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
149-
"size": "405149394"
146+
"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",
147+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
148+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
149+
"size": "421300036"
150150
},
151151
{
152152
"host": "aarch64-linux-gnu",
153-
"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",
154-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
155-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
156-
"size": "405149394"
153+
"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",
154+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
155+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
156+
"size": "421300036"
157157
},
158158
{
159159
"host": "arm-linux-gnueabihf",
160-
"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",
161-
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-28ac0243-v1.zip",
162-
"checksum": "SHA-256:280401ea803d8a782c11ef4f96cfbf80eb12a0f51bd12eac9cb96d6c26489f6e",
163-
"size": "405149394"
160+
"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",
161+
"archiveFileName": "esp32-arduino-libs-idf-release_v5.5-cbe9388f-v1.zip",
162+
"checksum": "SHA-256:b737ffb86a1b377db12dd610d06936ca8d85d877c872f532a68f6f0a3f666a3f",
163+
"size": "421300036"
164164
}
165165
]
166166
},

0 commit comments

Comments
 (0)