Skip to content

Commit fa67115

Browse files
authored
Merge branch 'master' into release/v3.1.x
2 parents 4c4906f + 5ecda3a commit fa67115

File tree

94 files changed

+1494
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1494
-177
lines changed

boards.txt

Lines changed: 882 additions & 0 deletions
Large diffs are not rendered by default.

cores/esp32/Esp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,13 @@ const char *EspClass::getChipModel(void) {
262262
uint32_t pkg_ver = chip_ver & 0x7;
263263
switch (pkg_ver) {
264264
case EFUSE_RD_CHIP_VER_PKG_ESP32D0WDQ6:
265-
if (getChipRevision() == 3) {
265+
if ((getChipRevision() / 100) == 3) {
266266
return "ESP32-D0WDQ6-V3";
267267
} else {
268268
return "ESP32-D0WDQ6";
269269
}
270270
case EFUSE_RD_CHIP_VER_PKG_ESP32D0WDQ5:
271-
if (getChipRevision() == 3) {
271+
if ((getChipRevision() / 100) == 3) {
272272
return "ESP32-D0WD-V3";
273273
} else {
274274
return "ESP32-D0WD";

cores/esp32/esp32-hal-gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ extern void ARDUINO_ISR_ATTR __digitalWrite(uint8_t pin, uint8_t val) {
166166
//use RMT to set all channels on/off
167167
RGB_BUILTIN_storage = val;
168168
const uint8_t comm_val = val != 0 ? RGB_BRIGHTNESS : 0;
169-
neopixelWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
169+
rgbLedWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
170170
return;
171171
}
172172
#endif // RGB_BUILTIN

cores/esp32/esp32-hal-rgb-led.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
#include "esp32-hal-rgb-led.h"
1818

19+
// Backward compatibility - Deprecated. It will be removed in future releases.
20+
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
21+
log_w("neopixelWrite() is deprecated. Use rgbLedWrite().");
22+
rgbLedWrite(pin, red_val, green_val, blue_val);
23+
}
24+
1925
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
2026
rgbLedWriteOrdered(pin, RGB_BUILTIN_LED_COLOR_ORDER, red_val, green_val, blue_val);
2127
}

cores/esp32/esp32-hal-rgb-led.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ void rgbLedWriteOrdered(uint8_t pin, rgb_led_color_order_t order, uint8_t red_va
2929
// Will use RGB_BUILTIN_LED_COLOR_ORDER
3030
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
3131

32-
// Backward compatibility
33-
#define neopixelWrite(p, r, g, b) rgbLedWrite(p, r, g, b)
32+
// Backward compatibility - Deprecated. It will be removed in future releases.
33+
[[deprecated("Use rgbLedWrite() instead.")]]
34+
void neopixelWrite(uint8_t p, uint8_t r, uint8_t g, uint8_t b);
3435

3536
#ifdef __cplusplus
3637
}

cores/esp32/io_pin_remap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int8_t gpioNumberToDigitalPin(int8_t gpioNumber);
7777
#define pinMatrixOutDetach(pin, invertOut, invertEnable) pinMatrixOutDetach(digitalPinToGPIONumber(pin), invertOut, invertEnable)
7878

7979
// cores/esp32/esp32-hal-rgb-led.h
80-
#define neopixelWrite(pin, red_val, green_val, blue_val) neopixelWrite(digitalPinToGPIONumber(pin), red_val, green_val, blue_val)
80+
#define rgbLedWrite(pin, red_val, green_val, blue_val) rgbLedWrite(digitalPinToGPIONumber(pin), red_val, green_val, blue_val)
8181

8282
// cores/esp32/esp32-hal-rmt.h
8383
#define rmtInit(pin, channel_direction, memsize, frequency_Hz) rmtInit(digitalPinToGPIONumber(pin), channel_direction, memsize, frequency_Hz)

docs/en/api/rmt.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Example
1414

1515
To get started with RMT, you can try:
1616

17-
RMT Write Neo Pixel
18-
*******************
17+
RMT Write RGB LED
18+
*****************
1919

20-
.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino
20+
.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino
2121
:language: arduino
2222

2323

libraries/ArduinoOTA/src/ArduinoOTA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void ArduinoOTAClass::handle() {
376376
if (_udp_ota.parsePacket()) {
377377
_onRx();
378378
}
379-
_udp_ota.flush(); // always flush, even zero length packets must be flushed.
379+
_udp_ota.clear(); // always clear, even zero length packets must be cleared.
380380
}
381381

382382
int ArduinoOTAClass::getCommand() {

libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Calling digitalWrite(RGB_BUILTIN, HIGH) will use hidden RGB driver.
77
88
RGBLedWrite demonstrates control of each channel:
9-
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
9+
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
1010
1111
WARNING: After using digitalWrite to drive RGB LED it will be impossible to drive the same pin
1212
with normal HIGH/LOW level
@@ -27,13 +27,13 @@ void loop() {
2727
digitalWrite(RGB_BUILTIN, LOW); // Turn the RGB LED off
2828
delay(1000);
2929

30-
neopixelWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
30+
rgbLedWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
3131
delay(1000);
32-
neopixelWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
32+
rgbLedWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
3333
delay(1000);
34-
neopixelWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
34+
rgbLedWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
3535
delay(1000);
36-
neopixelWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
36+
rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
3737
delay(1000);
3838
#endif
3939
}

libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#else
1818

1919
// add the file "build_opt.h" to your Arduino project folder with "-DESP32_ARDUINO_NO_RGB_BUILTIN" to use the RMT Legacy driver
20-
// neoPixelWrite() is a function that writes to the RGB LED and it won't be available here
20+
// rgbLedWrite() is a function that writes to the RGB LED and it won't be available here
2121
#include "driver/rmt.h"
2222

2323
bool installed = false;

0 commit comments

Comments
 (0)