Skip to content

Commit a977d07

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents aa9d22d + ae71b2d commit a977d07

File tree

17 files changed

+1042
-51
lines changed

17 files changed

+1042
-51
lines changed

Diff for: boards.txt

100755100644
+559-2
Large diffs are not rendered by default.

Diff for: cores/esp32/esp32-hal-uart.c

+2-1
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

Diff for: docs/en/api/adc.rst

+2-2
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.

Diff for: docs/en/api/preferences.rst

+7-5
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
..

Diff for: docs/en/tutorials/preferences.rst

+6-6
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

Diff for: libraries/RainMaker/src/RMaker.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <esp_rmaker_schedule.h>
55
#include <esp_rmaker_utils.h>
66
#include <esp_rmaker_scenes.h>
7+
#include <esp_rmaker_common_events.h>
78
bool wifiLowLevelInit(bool persistent);
89
static esp_err_t err;
910

@@ -20,6 +21,16 @@ static void event_handler(void *arg, esp_event_base_t event_base, int32_t event_
2021
case RMAKER_EVENT_CLAIM_FAILED: log_i("RainMaker Claim Failed."); break;
2122
default: log_i("Unhandled RainMaker Event:");
2223
}
24+
} else if (event_base == RMAKER_COMMON_EVENT) {
25+
switch (event_id) {
26+
case RMAKER_EVENT_REBOOT: log_i("Rebooting in %d seconds.", *((uint8_t *)event_data)); break;
27+
case RMAKER_EVENT_WIFI_RESET: log_i("Wi-Fi credentials reset."); break;
28+
case RMAKER_EVENT_FACTORY_RESET: log_i("Node reset to factory defaults."); break;
29+
case RMAKER_MQTT_EVENT_CONNECTED: log_i("MQTT Connected."); break;
30+
case RMAKER_MQTT_EVENT_DISCONNECTED: log_i("MQTT Disconnected."); break;
31+
case RMAKER_MQTT_EVENT_PUBLISHED: log_i("MQTT Published. Msg id: %d.", *((int *)event_data)); break;
32+
default: log_w("Unhandled RainMaker Common Event: %" PRIi32, event_id);
33+
}
2334
} else if (event_base == RMAKER_OTA_EVENT) {
2435
if (event_data == NULL) {
2536
event_data = (void *)"";
@@ -46,6 +57,7 @@ Node RMakerClass::initNode(const char *name, const char *type) {
4657
esp_rmaker_node_t *rnode = NULL;
4758
esp_event_handler_register(RMAKER_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL);
4859
esp_event_handler_register(RMAKER_OTA_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL);
60+
esp_event_handler_register(RMAKER_COMMON_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL);
4961
rnode = esp_rmaker_node_init(&rainmaker_cfg, name, type);
5062
if (!rnode) {
5163
log_e("Node init failed");

Diff for: libraries/SD/src/sd_diskio.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,10 @@ uint8_t sdcard_uninit(uint8_t pdrv) {
671671
if (pdrv >= FF_VOLUMES || card == NULL) {
672672
return 1;
673673
}
674-
AcquireSPI lock(card);
675-
sdTransaction(pdrv, GO_IDLE_STATE, 0, NULL);
674+
{
675+
AcquireSPI lock(card);
676+
sdTransaction(pdrv, GO_IDLE_STATE, 0, NULL);
677+
} // lock is destructed here
676678
ff_diskio_register(pdrv, NULL);
677679
s_cards[pdrv] = NULL;
678680
esp_err_t err = ESP_OK;

Diff for: libraries/WebServer/examples/WebServer/README.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ This example shows different techniques on how to use and extend the WebServer f
44

55
It is a small project in it's own and has some files to use on the web server to show how to use simple REST based services.
66

7-
This example requires some space for a filesystem and runs fine boards with 4 MByte flash using the following options:
7+
This example requires some space for a filesystem and runs fine on supported SoCs with 4 MByte or more flash by selecting the proper partition table:
8+
9+
* For using SPIFFS(LittleFS): Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
10+
* For using FATFS: Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
811

9-
* Board: ESP32 Dev Module
10-
* Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
11-
but LittleFS will be used in the partition (not SPIFFS)
1212

1313
It features
1414

@@ -28,9 +28,9 @@ It features
2828

2929
Currently, this example supports the following targets.
3030

31-
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 |
32-
| ----------------- | ----- | -------- | -------- |
33-
| | yes | yes | yes |
31+
| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C6 |
32+
| ----------------- | ----- | -------- | -------- | -------- | -------- |
33+
| | yes | yes | yes | yes | yes |
3434

3535
## Use the Example
3636

@@ -200,6 +200,7 @@ This class has to implements several functions and works in a more detailed way:
200200
201201
* The `canUpload()`and `upload()` methods work similar while the `upload()` method is called multiple times to create, append data and close the new file.
202202
203+
203204
## File upload
204205
205206
By opening <http://webserver/$upload.htm> you can easily upload files by dragging them over the drop area.
@@ -238,6 +239,7 @@ You can see on the Serial output that one filesystem write error is reported.
238239
Please be patient and wait for the upload ending even when writing to the filesystem is disabled
239240
it maybe take more than a minute.
240241
242+
241243
## Registering a special handler for "file not found"
242244
243245
Any other incoming request that was not handled by the registered plug-ins above can be detected by registering
@@ -253,6 +255,7 @@ Any other incoming request that was not handled by the registered plug-ins above
253255
This allows sending back an "friendly" result for the browser. Here a simple html page is created from a static string.
254256
You can easily change the html code in the file `builtinfiles.h`.
255257
258+
256259
## customizations
257260
258261
You may like to change the hostname and the timezone in the lines:
@@ -262,10 +265,18 @@ You may like to change the hostname and the timezone in the lines:
262265
> #define TIMEZONE "CET-1CEST,M3.5.0,M10.5.0/3"
263266
> ```
264267
268+
265269
## Troubleshooting
266270
267271
Have a look in the Serial output for some additional runtime information.
268272
273+
274+
## Changes
275+
276+
* 2024-08-02 -- Fixing for board implementation 3.0.4 ff.
277+
* 2024-08-02 -- Support for FAT
278+
279+
269280
## Contribute
270281
271282
To know how to contribute to this project, see [How to contribute.](https://github.com/espressif/arduino-esp32/blob/master/CONTRIBUTING.rst)
@@ -274,11 +285,13 @@ If you have any **feedback** or **issue** to report on this example/library, ple
274285
275286
Before creating a new issue, be sure to try Troubleshooting and check if the same issue was already created by someone else.
276287
288+
277289
## Resources
278290
279291
* Official ESP32 Forum: [Link](https://esp32.com)
280292
* Arduino-ESP32 Official Repository: [espressif/arduino-esp32](https://github.com/espressif/arduino-esp32)
281293
* ESP32 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf)
282294
* ESP32-S2 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf)
295+
* ESP32-S3 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf)
283296
* ESP32-C3 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf)
284297
* Official ESP-IDF documentation: [ESP-IDF](https://idf.espressif.com)

0 commit comments

Comments
 (0)