Skip to content

Commit 447f6db

Browse files
authored
Merge branch 'master' into release/v2.x
2 parents 3670e2b + 72c41d0 commit 447f6db

File tree

25 files changed

+1378
-141
lines changed

25 files changed

+1378
-141
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v2.0.9
4445
- v2.0.8
4546
- v2.0.7
4647
- v2.0.6

boards.txt

Lines changed: 786 additions & 2 deletions
Large diffs are not rendered by default.

cores/esp32/HWCDC.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ESP_EVENT_DEFINE_BASE(ARDUINO_HW_CDC_EVENTS);
2828

2929
static RingbufHandle_t tx_ring_buf = NULL;
3030
static xQueueHandle rx_queue = NULL;
31-
static uint8_t rx_data_buf[64];
31+
static uint8_t rx_data_buf[64] = {0};
3232
static intr_handle_t intr_handle = NULL;
3333
static volatile bool initial_empty = false;
3434
static xSemaphoreHandle tx_lock = NULL;
@@ -195,6 +195,7 @@ void HWCDC::end()
195195
intr_handle = NULL;
196196
if(tx_lock != NULL) {
197197
vSemaphoreDelete(tx_lock);
198+
tx_lock = NULL;
198199
}
199200
setRxBufferSize(0);
200201
setTxBufferSize(0);

cores/esp32/HardwareSerial.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,6 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
367367
}
368368
break;
369369
#endif
370-
default:
371-
log_e("Bad UART Number");
372-
return;
373370
}
374371
}
375372

cores/esp32/esp32-hal-bt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
#ifdef CONFIG_BT_ENABLED
1818

19-
bool btInUse(){ return true; }
19+
// user may want to change it to free resources
20+
__attribute__((weak)) bool btInUse(){ return true; }
2021

2122
#include "esp_bt.h"
2223

cores/esp32/esp32-hal-misc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ bool verifyRollbackLater() { return false; }
209209
#endif
210210

211211
#ifdef CONFIG_BT_ENABLED
212-
//overwritten in esp32-hal-bt.c
213-
bool btInUse() __attribute__((weak));
214-
bool btInUse(){ return false; }
212+
//from esp32-hal-bt.c
213+
extern bool btInUse();
215214
#endif
216215

217216
void initArduino()

docs/source/api/ledc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This function is used to setup the LEDC channel to 50 % PWM tone on selected fre
9090
* ``freq`` select frequency of pwm signal.
9191

9292
This function will return ``frequency`` set for channel.
93-
If ``0`` is returned, error occurs and ledc cahnnel was not configured.
93+
If ``0`` is returned, error occurs and ledc channel was not configured.
9494

9595
ledcWriteNote
9696
*************

docs/source/faq.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,20 @@ How to compile libs with different debug level?
1515
-----------------------------------------------
1616

1717
The short answer is ``esp32-arduino-lib-builder/configs/defconfig.common:44``. A guide explaining the process can be found here <guides/core_debug>
18+
19+
SPIFFS mount failed
20+
-------------------
21+
When you come across and error like this:
22+
23+
.. code-block:: shell
24+
25+
E (588) SPIFFS: mount failed, -10025
26+
[E][SPIFFS.cpp:47] begin(): Mounting SPIFFS failed! Error: -1
27+
28+
Try enforcing format on fail in your code by adding ``true`` in the ``begin`` method such as this:
29+
30+
.. code-block:: c++
31+
32+
SPIFFS.begin(true);
33+
34+
See the method prototype for reference: ``bool begin(bool formatOnFail=false, const char * basePath="/spiffs", uint8_t maxOpenFiles=10, const char * partitionLabel=NULL);``

docs/source/tutorials/preferences.rst

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ Like so:
233233

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

240240

241241
Summary
@@ -277,9 +277,10 @@ When started, the system has no way of knowing which of the above conditions is
277277
// not the complete setup(), but in setup(), include this...
278278
279279
stcPrefs.begin("STCPrefs", RO_MODE); // Open our namespace (or create it
280-
// if it doesn't exist) in in RO mode.
280+
// if it doesn't exist) in RO mode.
281281
282-
bool tpInit = stcPrefs.isKey("nvsInit"); // Test for the existence of the "already initialized" key.
282+
bool tpInit = stcPrefs.isKey("nvsInit"); // Test for the existence
283+
// of the "already initialized" key.
283284
284285
if (tpInit == false) {
285286
// If tpInit is 'false', the key "nvsInit" does not yet exist therefore this
@@ -289,13 +290,15 @@ When started, the system has no way of knowing which of the above conditions is
289290
290291
291292
// The .begin() method created the "STCPrefs" namespace and since this is our
292-
// first-time run we will create our keys and store the initial "factory default" values.
293+
// first-time run we will create
294+
// our keys and store the initial "factory default" values.
293295
stcPrefs.putUChar("curBright", 10);
294296
stcPrefs.putString("talChan", "one");
295297
stcPrefs.putLong("talMax", -220226);
296298
stcPrefs.putBool("ctMde", true);
297299
298-
stcPrefs.putBool("nvsInit", true); // Create the "already initialized" key and store a value.
300+
stcPrefs.putBool("nvsInit", true); // Create the "already initialized"
301+
// key and store a value.
299302
300303
// The "factory defaults" are created and stored so...
301304
stcPrefs.end(); // Close the namespace in RW mode and...
@@ -456,10 +459,12 @@ This is best explained with an example. Here the ``Bytes`` methods are used to s
456459
Serial.begin(115200);
457460
delay(250);
458461
459-
mySketchPrefs.begin("myPrefs", RW_MODE); // open (or create) the namespace "myPrefs" in RW mode
462+
mySketchPrefs.begin("myPrefs", RW_MODE); // open (or create) the namespace
463+
// "myPrefs" in RW mode
460464
mySketchPrefs.clear(); // delete any previous keys in this namespace
461465
462-
// Create an array of test values. We're using hex numbers throughout to better show how the bytes move around.
466+
// Create an array of test values. We're using hex numbers
467+
// throughout to better show how the bytes move around.
463468
int16_t myArray[] = { 0x1112, 0x2122, 0x3132, 0x4142, 0x5152, 0x6162, 0x7172 };
464469
465470
Serial.println("Printing myArray...");
@@ -468,22 +473,28 @@ This is best explained with an example. Here the ``Bytes`` methods are used to s
468473
}
469474
Serial.println("\r\n");
470475
471-
// In the next statement, the second sizeof() needs to match the data type of the elements of myArray
472-
Serial.print("The number of elements in myArray is: "); Serial.println( sizeof(myArray) / sizeof(int16_t) );
473-
Serial.print("But the size of myArray in bytes is: "); Serial.println( sizeof(myArray) );
476+
// In the next statement, the second sizeof() needs
477+
// to match the data type of the elements of myArray
478+
Serial.print("The number of elements in myArray is: ");
479+
Serial.println( sizeof(myArray) / sizeof(int16_t) );
480+
Serial.print("But the size of myArray in bytes is: ");
481+
Serial.println( sizeof(myArray) );
474482
Serial.println("");
475483
476-
Serial.println("Storing myArray into the Preferences namespace \"myPrefs\" against the key \"myPrefsBytes\".");
484+
Serial.println(
485+
"Storing myArray into the Preferences namespace \"myPrefs\" against the key \"myPrefsBytes\".");
477486
// Note: in the next statement, to store the entire array, we must use the
478487
// size of the arrray in bytes, not the number of elements in the array.
479488
mySketchPrefs.putBytes( "myPrefsBytes", myArray, sizeof(myArray) );
480-
Serial.print("The size of \"myPrefsBytes\" is (in bytes): "); Serial.println( mySketchPrefs.getBytesLength("myPrefsBytes") );
489+
Serial.print("The size of \"myPrefsBytes\" is (in bytes): ");
490+
Serial.println( mySketchPrefs.getBytesLength("myPrefsBytes") );
481491
Serial.println("");
482492
483-
int16_t myIntBuffer[20] = {}; // No magic about 20. Just making a buffer (array) big enough.
493+
int16_t myIntBuffer[20] = {}; // No magic about 20. Just making a buffer (array) big enough.
484494
Serial.println("Retrieving the value of myPrefsBytes into myIntBuffer.");
485495
Serial.println(" - Note the data type of myIntBuffer matches that of myArray");
486-
mySketchPrefs.getBytes( "myPrefsBytes", myIntBuffer, mySketchPrefs.getBytesLength("myPrefsBytes") );
496+
mySketchPrefs.getBytes("myPrefsBytes", myIntBuffer,
497+
mySketchPrefs.getBytesLength("myPrefsBytes"));
487498
488499
Serial.println("Printing myIntBuffer...");
489500
// In the next statement, sizeof() needs to match the data type of the elements of myArray
@@ -492,9 +503,11 @@ This is best explained with an example. Here the ``Bytes`` methods are used to s
492503
}
493504
Serial.println("\r\n");
494505
495-
Serial.println("We can see how the data from myArray is actually stored in the namespace as follows.");
496-
uint8_t myByteBuffer[40] = {}; // No magic about 40. Just making a buffer (array) big enough.
497-
mySketchPrefs.getBytes( "myPrefsBytes", myByteBuffer, mySketchPrefs.getBytesLength("myPrefsBytes") );
506+
Serial.println(
507+
"We can see how the data from myArray is actually stored in the namespace as follows.");
508+
uint8_t myByteBuffer[40] = {}; // No magic about 40. Just making a buffer (array) big enough.
509+
mySketchPrefs.getBytes("myPrefsBytes", myByteBuffer,
510+
mySketchPrefs.getBytesLength("myPrefsBytes"));
498511
499512
Serial.println("Printing myByteBuffer...");
500513
for (int i = 0; i < mySketchPrefs.getBytesLength("myPrefsBytes"); i++) {

libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
//#define CAMERA_MODEL_ESP32_CAM_BOARD
2929
//#define CAMERA_MODEL_ESP32S2_CAM_BOARD
3030
//#define CAMERA_MODEL_ESP32S3_CAM_LCD
31-
31+
//#define CAMERA_MODEL_DFRobot_FireBeetle2_ESP32S3 // Has PSRAM
32+
//#define CAMERA_MODEL_DFRobot_Romeo_ESP32S3 // Has PSRAM
3233
#include "camera_pins.h"
3334

3435
// ===========================

0 commit comments

Comments
 (0)