Skip to content

Commit 7beab8e

Browse files
authored
Merge branch 'master' into esp-idf-v5.1-libs
2 parents 388106f + df287cc commit 7beab8e

30 files changed

+1265
-73
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v2.0.14
45+
- v2.0.13
46+
- v2.0.12
4447
- v2.0.11
4548
- v2.0.10
4649
- v2.0.9

boards.txt

+816-50
Large diffs are not rendered by default.

cores/esp32/HardwareSerial.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ void HardwareSerial::end(bool fullyTerminate)
456456
// do not invalidate callbacks, detach pins, invalidate DBG output
457457
uart_driver_delete(_uart_nr);
458458
}
459+
460+
uartEnd(_uart);
459461
_uart = 0;
460462
_destroyEventTask();
461463
}

docs/source/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ Legal Part
135135

136136
Before a contribution can be accepted, you will need to sign our contributor agreement. You will be prompted for this automatically as part of the Pull Request process.
137137

138-
.. _Arduino style guide: https://www.arduino.cc/en/Reference/StyleGuide
138+
.. _Arduino style guide: https://docs.arduino.cc/learn/contributions/arduino-writing-style-guide

docs/source/installing.rst

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Installing using PlatformIO
7373

7474
PlatformIO is a professional collaborative platform for embedded development. It has out-of-the-box support for ESP32 SoCs and allows working with Arduino ESP32 as well as ESP-IDF from Espressif without changing your development environment. PlatformIO includes lots of instruments for the most common development tasks such as debugging, unit testing, and static code analysis.
7575

76+
.. warning:: PlatformIO is not officially supported by Espressif. Please report any issues with PlatformIO directly to its developers on the official `PlatformIO repositories <https://github.com/platformio>`_.
77+
7678
A detailed overview of the PlatformIO ecosystem and its philosophy can be found in `the official documentation <https://docs.platformio.org/en/latest/core/index.html>`_.
7779

7880
PlatformIO can be used in two flavors:

docs/source/ota_web_update.rst

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ OTAWebUpdate is done with a web browser that can be useful in the following typi
88
- after deployment if user is unable to expose Firmware for OTA from external update server
99
- provide updates after deployment to small quantity of modules when setting an update server is not practicable
1010

11+
For more information about the update process, please refer to the `OTA API reference <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/ota.html>`_
12+
section of the ESP-IDF documentation.
13+
1114
Requirements
1215
------------
1316

libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ bool BTAdvertisedDeviceSet::haveRSSI() const { return m_haveRSSI; }
4141
std::string BTAdvertisedDeviceSet::toString() {
4242
std::string res = "Name: " + getName() + ", Address: " + std::string(getAddress().toString().c_str(), getAddress().toString().length());
4343
if (haveCOD()) {
44-
char val[6];
45-
snprintf(val, sizeof(val), "%ld", getCOD());
46-
res += ", cod: ";
44+
char val[7]; //6 hex digits + null
45+
snprintf(val, sizeof(val), "%06x", getCOD() & 0xFFFFFF);
46+
res += ", cod: 0x";
4747
res += val;
4848
}
4949
if (haveRSSI()) {

libraries/SD/README.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,12 @@ Some ESP32 modules have different pin outs!
1818
## Default SPI pins:
1919
Note that SPI pins can be configured by using `SPI.begin(sck, miso, mosi, cs);` alternatively, you can change only the CS pin with `SD.begin(CSpin)`
2020

21-
+--------------+---------+-------+----------+----------+----------+
2221
| SPI Pin Name | ESP8266 | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-S3 |
23-
+==============+=========+=======+==========+==========+==========+
22+
|--------------|---------|-------|----------|----------|----------|
2423
| CS (SS) | GPIO15 | GPIO5 | GPIO5 | GPIO13 | GPIO13 |
25-
+--------------+---------+-------+----------+----------+----------+
2624
| DI (MOSI) | GPIO13 | GPIO23| GPIO24 | GPIO14 | GPIO14 |
27-
+--------------+---------+-------+----------+----------+----------+
2825
| DO (MISO) | GPIO12 | GPIO19| GPIO25 | GPIO15 | GPIO15 |
29-
+--------------+---------+-------+----------+----------+----------+
3026
| SCK (SCLK) | GPIO14 | GPIO18| GPIO19 | GPIO16 | GPIO16 |
31-
+--------------+---------+-------+----------+----------+----------+
3227

3328
## FAQ:
3429

libraries/SD_MMC/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Image source: [Wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/a
1515
Image source: [Wikipedia](https://commons.wikimedia.org/wiki/File:15-04-29-MMC-Karte-dscf4734-e.jpg)
1616

1717
pin number (refer to the picture) | micro SD - SD mode | micro SD - SPI mode | mini SD - SD mode | mini SD - SPI mode | SD - SD mode | SD - SPI mode | MMC (MMC3) - MMC mode | MMC (MMC3) - SPI mode | MMCplus / MMCmobile (MMC4) - MMC mode | MMCplus / MMCmobile (MMC4) - SPI mode
18-
----------------------------------|--------------------|---------------------|-------------------|--------------------|--------------|---------------|-----------------------|-----------------------|---------------------------------------|
18+
----------------------------------|--------------------|---------------------|-------------------|--------------------|--------------|---------------|-----------------------|-----------------------|-----------------------------------------|--------------------------------------
1919
1 | D2 | not used | D3 | CS | D3 | CS | RES | CS | D3 | CS
2020
2 | D3 | CS | CMD | DI | CMD | DI | CMD | DI | CMD | DI
2121
3 | CMD | DI | VSS1 (GND) | VSS1 (GND) | VSS1 (GND) | VSS1 (GND) | VSS1 (GND) | VSS1 (GND) | VSS1 (GND) | VSS1 (GND)

libraries/WiFi/src/WiFiClient.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class WiFiClientSocketHandle {
182182
}
183183
};
184184

185-
WiFiClient::WiFiClient():_connected(false),_timeout(WIFI_CLIENT_DEF_CONN_TIMEOUT_MS),next(NULL)
185+
WiFiClient::WiFiClient():_rxBuffer(nullptr),_connected(false),_timeout(WIFI_CLIENT_DEF_CONN_TIMEOUT_MS),next(NULL)
186186
{
187187
}
188188

@@ -508,7 +508,9 @@ int WiFiClient::available()
508508
// Though flushing means to send all pending data,
509509
// seems that in Arduino it also means to clear RX
510510
void WiFiClient::flush() {
511-
_rxBuffer->flush();
511+
if (_rxBuffer != nullptr) {
512+
_rxBuffer->flush();
513+
}
512514
}
513515

514516
uint8_t WiFiClient::connected()
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table, 0x8000, 4K
5+
6+
nvs, data, nvs, 0x9000, 20K,
7+
otadata, data, ota, 0xe000, 8K,
8+
ota_0, app, ota_0, 0x10000, 2816K,
9+
uf2, app, factory,0x2d0000, 256K,
10+
ffat, data, fat, 0x310000, 960K,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
7+
#define USB_VID 0x239A
8+
#define USB_PID 0x8117
9+
#define USB_MANUFACTURER "Adafruit"
10+
#define USB_PRODUCT "Camera ESP32-S3"
11+
#define USB_SERIAL "" // Empty string for MAC adddress
12+
13+
14+
#define EXTERNAL_NUM_INTERRUPTS 46
15+
#define NUM_DIGITAL_PINS 48
16+
#define NUM_ANALOG_INPUTS 20
17+
18+
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
19+
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
20+
#define digitalPinHasPWM(p) (p < 46)
21+
22+
static const uint8_t PIN_NEOPIXEL = 1;
23+
static const uint8_t NEOPIXEL_PIN = 1;
24+
25+
//static const uint8_t TFT_BACKLIGHT = 41;
26+
static const uint8_t TFT_DC = 40;
27+
static const uint8_t TFT_CS = 39;
28+
static const uint8_t TFT_RESET = 38;
29+
static const uint8_t TFT_RST = 38;
30+
31+
static const uint8_t SD_CS = 48;
32+
static const uint8_t SD_CHIP_SELECT = 48;
33+
static const uint8_t SPEAKER = 41;
34+
35+
static const uint8_t SDA = 33;
36+
static const uint8_t SCL = 34;
37+
38+
static const uint8_t SS = 48;
39+
static const uint8_t MOSI = 35;
40+
static const uint8_t SCK = 36;
41+
static const uint8_t MISO = 37;
42+
43+
static const uint8_t A0 = 17;
44+
static const uint8_t A1 = 18;
45+
static const uint8_t BATT_MONITOR = 4;
46+
static const uint8_t SHUTTER_BUTTON = 0;
47+
48+
static const uint8_t TX = 43;
49+
static const uint8_t RX = 44;
50+
51+
static const uint8_t DAC1 = 17;
52+
static const uint8_t DAC2 = 18;
53+
54+
#define AWEXP_SPKR_SD 0
55+
#define AWEXP_BUTTON_SEL 1
56+
#define AWEXP_BACKLIGHT 2
57+
#define AWEXP_CAM_PWDN 7
58+
#define AWEXP_SD_DET 8
59+
#define AWEXP_SD_PWR 9
60+
#define AWEXP_CAM_RST 10
61+
#define AWEXP_BUTTON_OK 11
62+
#define AWEXP_BUTTON_RIGHT 12
63+
#define AWEXP_BUTTON_UP 13
64+
#define AWEXP_BUTTON_LEFT 14
65+
#define AWEXP_BUTTON_DOWN 15
66+
67+
#define PWDN_GPIO_NUM -1 // connected through expander
68+
#define RESET_GPIO_NUM -1 // connected through expander
69+
#define XCLK_GPIO_NUM 8
70+
#define SIOD_GPIO_NUM SDA
71+
#define SIOC_GPIO_NUM SCL
72+
73+
#define Y9_GPIO_NUM 7
74+
#define Y8_GPIO_NUM 9
75+
#define Y7_GPIO_NUM 10
76+
#define Y6_GPIO_NUM 12
77+
#define Y5_GPIO_NUM 14
78+
#define Y4_GPIO_NUM 16
79+
#define Y3_GPIO_NUM 15
80+
#define Y2_GPIO_NUM 13
81+
#define VSYNC_GPIO_NUM 5
82+
#define HREF_GPIO_NUM 6
83+
#define PCLK_GPIO_NUM 11
84+
85+
86+
#endif /* Pins_Arduino_h */
198 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2021 Ha Thach (tinyusb.org) for Adafruit Industries
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
25+
26+
#include "esp32-hal-gpio.h"
27+
#include "pins_arduino.h"
28+
29+
extern "C" {
30+
31+
// Initialize variant/board, called before setup()
32+
void initVariant(void)
33+
{
34+
35+
}
36+
}
Binary file not shown.

variants/adafruit_metro_esp32s3/pins_arduino.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
#define LED_BUILTIN 13
2121

22-
#define PIN_NEOPIXEL 45
23-
#define NEOPIXEL_PIN 45
22+
#define PIN_NEOPIXEL 46
23+
#define NEOPIXEL_PIN 46
2424
#define NEOPIXEL_NUM 1
2525

2626
#define PIN_BUTTON1 0 // BOOT0 switch
@@ -33,10 +33,10 @@ static const uint8_t RX = 41;
3333
static const uint8_t SDA = 47;
3434
static const uint8_t SCL = 48;
3535

36-
static const uint8_t SS = 21;
37-
static const uint8_t MOSI = 35;
38-
static const uint8_t SCK = 36;
39-
static const uint8_t MISO = 37;
36+
static const uint8_t SS = 45;
37+
static const uint8_t MOSI = 42;
38+
static const uint8_t SCK = 39;
39+
static const uint8_t MISO = 21;
4040

4141
static const uint8_t A0 = 14;
4242
static const uint8_t A1 = 15;
0 Bytes
Binary file not shown.

variants/adafruit_metro_esp32s3/variant.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ extern "C" {
3030

3131
// Initialize variant/board, called before setup()
3232
void initVariant(void) {
33-
// default SD_CS to input pullup
33+
// default SD_CS to input pullup (we cannot have built in pullup since its
34+
// a strapping pin!)
3435
pinMode(SS, INPUT_PULLUP);
3536
}
3637

Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, app, ota_0, 0x10000, 2048K,
8+
ota_1, app, ota_1, 0x210000, 2048K,
9+
uf2, app, factory,0x410000, 256K,
10+
ffat, data, fat, 0x450000, 11968K,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define USB_VID 0x239A
7+
#define USB_PID 0x8147
8+
9+
#define USB_MANUFACTURER "Adafruit"
10+
#define USB_PRODUCT "Qualia ESP32-S3 RGB666"
11+
#define USB_SERIAL "" // Empty string for MAC adddress
12+
13+
#define EXTERNAL_NUM_INTERRUPTS 46
14+
#define NUM_DIGITAL_PINS 48
15+
#define NUM_ANALOG_INPUTS 2
16+
17+
#define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(analogChannelToDigitalPin(p)):-1)
18+
#define digitalPinToInterrupt(p) (((p)<EXTERNAL_NUM_INTERRUPTS)?(p):-1)
19+
#define digitalPinHasPWM(p) (p < 46)
20+
21+
static const uint8_t PCA_TFT_SCK = 0;
22+
static const uint8_t PCA_TFT_CS = 1;
23+
static const uint8_t PCA_TFT_RESET = 2;
24+
static const uint8_t PCA_CPT_IRQ = 3;
25+
static const uint8_t PCA_TFT_BACKLIGHT = 4;
26+
static const uint8_t PCA_BUTTON_UP = 5;
27+
static const uint8_t PCA_BUTTON_DOWN = 6;
28+
static const uint8_t PCA_TFT_MOSI = 7;
29+
30+
static const uint8_t TX = 16;
31+
static const uint8_t RX = 17;
32+
#define TX1 TX
33+
#define RX1 RX
34+
35+
static const uint8_t SDA = 8;
36+
static const uint8_t SCL = 18;
37+
38+
static const uint8_t SS = 15;
39+
static const uint8_t MOSI = 7;
40+
static const uint8_t MISO = 6;
41+
static const uint8_t SCK = 5;
42+
43+
static const uint8_t A0 = 17;
44+
static const uint8_t A1 = 16;
45+
46+
static const uint8_t T3 = 3; // Touch pin IDs map directly
47+
static const uint8_t T8 = 8; // to underlying GPIO numbers NOT
48+
static const uint8_t T9 = 9; // the analog numbers on board silk
49+
static const uint8_t T10 = 10;
50+
static const uint8_t T11 = 11;
51+
static const uint8_t T12 = 12;
52+
53+
54+
static const uint8_t TFT_R1 = 11;
55+
static const uint8_t TFT_R2 = 10;
56+
static const uint8_t TFT_R3 = 9;
57+
static const uint8_t TFT_R4 = 46;
58+
static const uint8_t TFT_R5 = 3;
59+
static const uint8_t TFT_G0 = 48;
60+
static const uint8_t TFT_G1 = 47;
61+
static const uint8_t TFT_G2 = 21;
62+
static const uint8_t TFT_G3 = 14;
63+
static const uint8_t TFT_G4 = 13;
64+
static const uint8_t TFT_G5 = 12;
65+
static const uint8_t TFT_B1 = 40;
66+
static const uint8_t TFT_B2 = 39;
67+
static const uint8_t TFT_B3 = 38;
68+
static const uint8_t TFT_B4 = 0;
69+
static const uint8_t TFT_B5 = 45;
70+
static const uint8_t TFT_PCLK = 1;
71+
static const uint8_t TFT_DE = 2;
72+
static const uint8_t TFT_HSYNC = 41;
73+
static const uint8_t TFT_VSYNC = 42;
74+
75+
#endif /* Pins_Arduino_h */
154 KB
Binary file not shown.

0 commit comments

Comments
 (0)