Skip to content

Commit 0ace444

Browse files
authored
Merge branch 'master' into feature/fri3d_badge_2024_esp32-s3
2 parents 66c1370 + a7399e2 commit 0ace444

File tree

32 files changed

+1769
-228
lines changed

32 files changed

+1769
-228
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ endforeach()
293293
set(includedirs variants/${CONFIG_ARDUINO_VARIANT}/ cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS})
294294
set(srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS})
295295
set(priv_includes cores/esp32/libb64)
296-
set(requires spi_flash esp_partition mbedtls wifi_provisioning wpa_supplicant esp_adc esp_eth http_parser)
296+
set(requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser espressif__network_provisioning)
297297
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid usb esp_psram ${ARDUINO_LIBRARIES_REQUIRES})
298298

299299
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThread)

boards.txt

100755100644
Lines changed: 973 additions & 16 deletions
Large diffs are not rendered by default.

cores/esp32/esp32-hal-uart.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,8 @@ int log_printfv(const char *format, va_list arg) {
895895
}
896896
#endif
897897
*/
898-
#if CONFIG_IDF_TARGET_ESP32C3 || ((CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C6) && ARDUINO_USB_CDC_ON_BOOT)
898+
#if (ARDUINO_USB_CDC_ON_BOOT == 1 && ARDUINO_USB_MODE == 0) || CONFIG_IDF_TARGET_ESP32C3 \
899+
|| ((CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C6) && ARDUINO_USB_CDC_ON_BOOT == 1)
899900
vsnprintf(temp, len + 1, format, arg);
900901
ets_printf("%s", temp);
901902
#else

docs/en/api/adc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ADC OneShot mode
2121

2222

2323
The ADC OneShot mode API is fully compatible with Arduino's ``analogRead`` function.
24-
When you call the ``analogRead`` or ``analogReadMillivolts`` function, it returns the result of a single conversion on the requested pin.
24+
When you call the ``analogRead`` or ``analogReadMilliVolts`` function, it returns the result of a single conversion on the requested pin.
2525

2626
analogRead
2727
^^^^^^^^^^
@@ -36,7 +36,7 @@ This function is used to get the ADC raw value for a given pin/ADC channel.
3636

3737
This function will return analog raw value (non-calibrated).
3838

39-
analogReadMillivolts
39+
analogReadMilliVolts
4040
^^^^^^^^^^^^^^^^^^^^
4141

4242
This function is used to get ADC raw value for a given pin/ADC channel and convert it to calibrated result in millivolts.

docs/en/api/preferences.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ Preferences directly supports the following data types:
6262
+-------------------+-------------------+---------------+
6363
| ULong | uint32_t | 4 |
6464
+-------------------+-------------------+---------------+
65+
| Float | float_t | 4 |
66+
+-------------------+-------------------+---------------+
6567
| Long64 | int64_t | 8 |
6668
+-------------------+-------------------+---------------+
6769
| ULong64 | uint64_t | 8 |
6870
+-------------------+-------------------+---------------+
69-
| Float | float_t | 8 |
70-
+-------------------+-------------------+---------------+
7171
| Double | double_t | 8 |
7272
+-------------------+-------------------+---------------+
7373
| | const char* | variable |
@@ -258,6 +258,8 @@ Arduino-esp32 Preferences API
258258
``putInt, putUInt``
259259
********************
260260
``putLong, putULong``
261+
**********************
262+
``putFloat``
261263
**********************
262264

263265
Store a value against a given key in the currently open namespace.
@@ -268,6 +270,7 @@ Arduino-esp32 Preferences API
268270
size_t putUInt(const char* key, uint32_t value)
269271
size_t putLong(const char* key, int32_t value)
270272
size_t putULong(const char* key, uint32_t value)
273+
size_t putFloat(const char* key, float_t value)
271274
272275
..
273276
@@ -288,16 +291,15 @@ Arduino-esp32 Preferences API
288291

289292
``putLong64, putULong64``
290293
*************************
291-
``putFloat, putDouble``
292-
***********************
294+
``putDouble``
295+
*************************
293296

294297
Store a value against a given key in the currently open namespace.
295298

296299
.. code-block:: arduino
297300
298301
size_t putLong64(const char* key, int64_t value)
299302
size_t putULong64(const char* key, uint64_t value)
300-
size_t putFloat(const char* key, float_t value)
301303
size_t putDouble(const char* key, double_t value)
302304
303305
..

docs/en/tutorials/preferences.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ Preferences directly supports the following data types:
7070
+-------------------+-------------------+---------------+
7171
| ULong | uint32_t | 4 |
7272
+-------------------+-------------------+---------------+
73+
| Float | float_t | 4 |
74+
+-------------------+-------------------+---------------+
7375
| Long64 | int64_t | 8 |
7476
+-------------------+-------------------+---------------+
7577
| ULong64 | uint64_t | 8 |
7678
+-------------------+-------------------+---------------+
77-
| Float | float_t | 8 |
78-
+-------------------+-------------------+---------------+
7979
| Double | double_t | 8 |
8080
+-------------------+-------------------+---------------+
81-
| | const char* | |
82-
| String +-------------------+ variable |
81+
| | const char* | variable |
82+
| String +-------------------+ |
8383
| | String | |
8484
+-------------------+-------------------+---------------+
8585
| Bytes | uint8_t | variable |
@@ -233,9 +233,9 @@ Like so:
233233

234234
.. code-block:: arduino
235235
236-
float myFloat = myPreferences.getFloat("pi");
236+
float_t myFloat = myPreferences.getFloat("pi");
237237
238-
This will retrieve the float value from the namespace key ``"pi"`` and assign it to the float type variable ``myFloat``.
238+
This will retrieve the float_t value from the namespace key ``"pi"`` and assign it to the float_t type variable ``myFloat``.
239239

240240

241241
Summary

idf_component.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ dependencies:
4949
require: public
5050
espressif/esp_modem:
5151
version: "^1.1.0"
52+
espressif/network_provisioning:
53+
version: "~1.0.0"
5254
espressif/esp-zboss-lib:
5355
version: "^1.0.1"
5456
rules:

libraries/Network/src/NetworkEvents.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#if SOC_WIFI_SUPPORTED
2121
#include "esp_wifi_types.h"
2222
#include "esp_smartconfig.h"
23-
#include "wifi_provisioning/wifi_config.h"
23+
#include "network_provisioning/network_config.h"
2424
#endif
2525

2626
#if SOC_WIFI_SUPPORTED
@@ -105,7 +105,7 @@ typedef union {
105105
wifi_event_ap_stadisconnected_t wifi_ap_stadisconnected;
106106
wifi_event_ftm_report_t wifi_ftm_report;
107107
wifi_sta_config_t prov_cred_recv;
108-
wifi_prov_sta_fail_reason_t prov_fail_reason;
108+
network_prov_wifi_sta_fail_reason_t prov_fail_reason;
109109
smartconfig_event_got_ssid_pswd_t sc_got_ssid_pswd;
110110
#endif
111111
} arduino_event_info_t;

libraries/RainMaker/examples/RMakerCustom/RMakerCustom.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ void sysProvEvent(arduino_event_t *sys_event) {
3030
case ARDUINO_EVENT_PROV_START:
3131
#if CONFIG_IDF_TARGET_ESP32S2
3232
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
33-
printQR(service_name, pop, "softap");
33+
WiFiProv.printQR(service_name, pop, "softap");
3434
#else
3535
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
36-
printQR(service_name, pop, "ble");
36+
WiFiProv.printQR(service_name, pop, "ble");
3737
#endif
3838
break;
39-
case ARDUINO_EVENT_PROV_INIT: wifi_prov_mgr_disable_auto_stop(10000); break;
40-
case ARDUINO_EVENT_PROV_CRED_SUCCESS: wifi_prov_mgr_stop_provisioning(); break;
39+
case ARDUINO_EVENT_PROV_INIT: WiFiProv.disableAutoStop(10000); break;
40+
case ARDUINO_EVENT_PROV_CRED_SUCCESS: WiFiProv.endProvision(); break;
4141
default: ;
4242
}
4343
}
@@ -101,9 +101,9 @@ void setup() {
101101

102102
WiFi.onEvent(sysProvEvent); // Will call sysProvEvent() from another thread.
103103
#if CONFIG_IDF_TARGET_ESP32S2
104-
WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name);
104+
WiFiProv.beginProvision(NETWORK_PROV_SCHEME_SOFTAP, NETWORK_PROV_SCHEME_HANDLER_NONE, NETWORK_PROV_SECURITY_1, pop, service_name);
105105
#else
106-
WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name);
106+
WiFiProv.beginProvision(NETWORK_PROV_SCHEME_BLE, NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM, NETWORK_PROV_SECURITY_1, pop, service_name);
107107
#endif
108108
}
109109

libraries/RainMaker/examples/RMakerCustomAirCooler/RMakerCustomAirCooler.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ void sysProvEvent(arduino_event_t *sys_event) {
4646
case ARDUINO_EVENT_PROV_START:
4747
#if CONFIG_IDF_TARGET_ESP32S2
4848
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
49-
printQR(service_name, pop, "softap");
49+
WiFiProv.printQR(service_name, pop, "softap");
5050
#else
5151
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
52-
printQR(service_name, pop, "ble");
52+
WiFiProv.printQR(service_name, pop, "ble");
5353
#endif
5454
break;
55-
case ARDUINO_EVENT_PROV_INIT: wifi_prov_mgr_disable_auto_stop(10000); break;
56-
case ARDUINO_EVENT_PROV_CRED_SUCCESS: wifi_prov_mgr_stop_provisioning(); break;
55+
case ARDUINO_EVENT_PROV_INIT: WiFiProv.disableAutoStop(10000); break;
56+
case ARDUINO_EVENT_PROV_CRED_SUCCESS: WiFiProv.endProvision(); break;
5757
default: ;
5858
}
5959
}
@@ -166,9 +166,9 @@ void setup() {
166166

167167
WiFi.onEvent(sysProvEvent); // Will call sysProvEvent() from another thread.
168168
#if CONFIG_IDF_TARGET_ESP32S2
169-
WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name);
169+
WiFiProv.beginProvision(NETWORK_PROV_SCHEME_SOFTAP, NETWORK_PROV_SCHEME_HANDLER_NONE, NETWORK_PROV_SECURITY_1, pop, service_name);
170170
#else
171-
WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name);
171+
WiFiProv.beginProvision(NETWORK_PROV_SCHEME_BLE, NETWORK_PROV_SCHEME_HANDLER_FREE_BTDM, NETWORK_PROV_SECURITY_1, pop, service_name);
172172
#endif
173173
}
174174

0 commit comments

Comments
 (0)