Skip to content

Commit 953afd5

Browse files
authored
Merge pull request letscontrolit#5111 from TD-er/feature/ESP_IDF5_3
[ESP-IDF5.3] LittleFS: ESP-IDF5.3, SPIFFS: ESP-IDF5.1
2 parents b29b245 + f6a6921 commit 953afd5

File tree

86 files changed

+3995
-2364
lines changed

Some content is hidden

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

86 files changed

+3995
-2364
lines changed

lib/Blynk/src/BlynkParticle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class BlynkTransportParticle
5353
return client.write((const uint8_t*)buf, len);
5454
}
5555

56-
void flush() { client.flush(); }
56+
void flush() { client.PR_9453_FLUSH_TO_CLEAR(); }
5757
bool connected() { return client.connected(); }
5858
int available() { return client.available(); }
5959

lib/ESPEasySerial/ESPEasySerialPort.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ const __FlashStringHelper* ESPEasySerialPort_toString(ESPEasySerialPort port, bo
1111
case ESPEasySerialPort::serial0_swap: return shortName ? F("serial0swap") : F("HW Serial0 swap");
1212
#endif // ifdef ESP8266
1313
case ESPEasySerialPort::serial0: return shortName ? F("serial0") : F("HW Serial0");
14-
#if SOC_UART_NUM > 1
14+
#if USABLE_SOC_UART_NUM > 1
1515
case ESPEasySerialPort::serial1: return shortName ? F("serial1") : F("HW Serial1");
16-
#endif // if SOC_UART_NUM > 1
17-
#if SOC_UART_NUM > 2
16+
#endif // if USABLE_SOC_UART_NUM > 1
17+
#if USABLE_SOC_UART_NUM > 2
1818
case ESPEasySerialPort::serial2: return shortName ? F("serial2") : F("HW Serial2");
19-
#endif // if SOC_UART_NUM > 2
19+
#endif // if USABLE_SOC_UART_NUM > 2
2020
#if USES_SW_SERIAL
2121
case ESPEasySerialPort::software: return shortName ? F("serialsw") : F("SW Serial");
2222
#endif // if USES_SW_SERIAL
@@ -43,12 +43,12 @@ bool isHWserial(ESPEasySerialPort port)
4343
case ESPEasySerialPort::serial0_swap:
4444
#endif // ifdef ESP8266
4545
case ESPEasySerialPort::serial0:
46-
#if SOC_UART_NUM > 1
46+
#if USABLE_SOC_UART_NUM > 1
4747
case ESPEasySerialPort::serial1:
48-
#endif // if SOC_UART_NUM > 1
49-
#if SOC_UART_NUM > 2
48+
#endif // if USABLE_SOC_UART_NUM > 1
49+
#if USABLE_SOC_UART_NUM > 2
5050
case ESPEasySerialPort::serial2:
51-
#endif // if SOC_UART_NUM > 2
51+
#endif // if USABLE_SOC_UART_NUM > 2
5252
return true;
5353
default:
5454
break;
@@ -63,12 +63,12 @@ bool useGPIOpins(ESPEasySerialPort port)
6363
#ifdef ESP8266
6464
case ESPEasySerialPort::serial0_swap:
6565
#endif // ifdef ESP8266
66-
#if SOC_UART_NUM > 1
66+
#if USABLE_SOC_UART_NUM > 1
6767
case ESPEasySerialPort::serial1:
68-
#endif // if SOC_UART_NUM > 1
69-
#if SOC_UART_NUM > 2
68+
#endif // if USABLE_SOC_UART_NUM > 1
69+
#if USABLE_SOC_UART_NUM > 2
7070
case ESPEasySerialPort::serial2:
71-
#endif // if SOC_UART_NUM > 2
71+
#endif // if USABLE_SOC_UART_NUM > 2
7272
#if USES_SW_SERIAL
7373
case ESPEasySerialPort::software:
7474
#endif // if USES_SW_SERIAL
@@ -90,12 +90,12 @@ bool validSerialPort(ESPEasySerialPort port)
9090
#ifdef ESP8266
9191
case ESPEasySerialPort::serial0_swap:
9292
#endif // ifdef ESP8266
93-
#if SOC_UART_NUM > 1
93+
#if USABLE_SOC_UART_NUM > 1
9494
case ESPEasySerialPort::serial1:
95-
#endif // if SOC_UART_NUM > 1
96-
#if SOC_UART_NUM > 2
95+
#endif // if USABLE_SOC_UART_NUM > 1
96+
#if USABLE_SOC_UART_NUM > 2
9797
case ESPEasySerialPort::serial2:
98-
#endif // if SOC_UART_NUM > 2
98+
#endif // if USABLE_SOC_UART_NUM > 2
9999
#if USES_SW_SERIAL
100100
case ESPEasySerialPort::software:
101101
#endif // if USES_SW_SERIAL

lib/ESPEasySerial/ESPEasySerialPort.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ enum class ESPEasySerialPort : uint8_t {
1414
#ifdef ESP8266
1515
serial0_swap = 3,
1616
#endif // ifdef ESP8266
17-
#if SOC_UART_NUM > 1
17+
#if USABLE_SOC_UART_NUM > 1
1818
serial1 = 4,
19-
#endif // if SOC_UART_NUM > 1
20-
#if SOC_UART_NUM > 2
19+
#endif // if USABLE_SOC_UART_NUM > 1
20+
#if USABLE_SOC_UART_NUM > 2
2121
serial2 = 5,
22-
#endif // if SOC_UART_NUM > 2
22+
#endif // if USABLE_SOC_UART_NUM > 2
2323
#if USES_SW_SERIAL
2424
software = 6,
2525
#endif // if USES_SW_SERIAL

lib/ESPEasySerial/ESPEasySerialType_ESP32.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ bool ESPeasySerialType::getSerialTypePins(ESPEasySerialPort serType, int& rxPin,
1010

1111
switch (serType) {
1212
case ESPEasySerialPort::serial0: rxPin = SOC_RX0; txPin = SOC_TX0; return true;
13-
# if SOC_UART_NUM > 1
13+
# if USABLE_SOC_UART_NUM > 1
1414
case ESPEasySerialPort::serial1: rxPin = SOC_RX1; txPin = SOC_TX1; return true;
15-
# endif // if SOC_UART_NUM > 1
16-
# if SOC_UART_NUM > 2
15+
# endif // if USABLE_SOC_UART_NUM > 1
16+
# if USABLE_SOC_UART_NUM > 2
1717
case ESPEasySerialPort::serial2: rxPin = SOC_RX2; txPin = SOC_TX2; return true;
18-
# endif // if SOC_UART_NUM > 2
18+
# endif // if USABLE_SOC_UART_NUM > 2
1919
# if USES_I2C_SC16IS752
2020
case ESPEasySerialPort::sc16is752: return true;
2121
# endif // if USES_I2C_SC16IS752
@@ -37,18 +37,18 @@ ESPEasySerialPort ESPeasySerialType::getSerialType(ESPEasySerialPort typeHint, i
3737

3838
// Serial1 on ESP32 uses default pins connected to flash
3939
// So must make sure to set them to other pins.
40-
# if SOC_UART_NUM > 1
40+
# if USABLE_SOC_UART_NUM > 1
4141

4242
if ((receivePin == SOC_RX1) && (transmitPin == SOC_TX1)) {
4343
return ESPEasySerialPort::serial1; // UART1
4444
}
45-
# endif // if SOC_UART_NUM > 1
46-
# if SOC_UART_NUM > 2
45+
# endif // if USABLE_SOC_UART_NUM > 1
46+
# if USABLE_SOC_UART_NUM > 2
4747

4848
if ((receivePin == SOC_RX2) && (transmitPin == SOC_TX2)) {
4949
return ESPEasySerialPort::serial2; // UART2
5050
}
51-
# endif // if SOC_UART_NUM > 2
51+
# endif // if USABLE_SOC_UART_NUM > 2
5252
# if USES_I2C_SC16IS752
5353

5454
if ((receivePin >= 0x48) && (receivePin <= 0x57)) {

lib/ESPEasySerial/ESPEasySerial_common_defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ static_assert(false, "Implement processor architecture");
1515
# endif // ifdef ESP8266
1616
#endif // ifndef SOC_UART_NUM
1717

18+
#ifndef USABLE_SOC_UART_NUM
19+
# ifdef SOC_UART_HP_NUM
20+
21+
// In ESP-IDF 5.3 the actual difference in high-power and low-power UART ports was defined.
22+
# define USABLE_SOC_UART_NUM SOC_UART_HP_NUM
23+
# else // ifdef SOC_UART_HP_NUM
24+
# ifdef ESP32C6
25+
26+
// ESP32-C6 has 3 UARTs (2 HP UART, and 1 LP UART)
27+
// We can only use the high-power ones
28+
# define USABLE_SOC_UART_NUM 2
29+
# else // ifdef ESP32C6
30+
# define USABLE_SOC_UART_NUM SOC_UART_NUM
31+
# endif // ifdef ESP32C6
32+
# endif // ifdef SOC_UART_HP_NUM
33+
#endif // ifndef USABLE_SOC_UART_NUM
1834

1935
#ifdef ESP32
2036

lib/ESPEasySerial/Port_ESPEasySerial_HardwareSerial.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <hal/uart_types.h>
88
#endif
99

10+
1011
Port_ESPEasySerial_HardwareSerial_t::Port_ESPEasySerial_HardwareSerial_t() {}
1112

1213
Port_ESPEasySerial_HardwareSerial_t::~Port_ESPEasySerial_HardwareSerial_t() {}
@@ -33,12 +34,12 @@ void Port_ESPEasySerial_HardwareSerial_t::resetConfig(const ESPEasySerialConfig&
3334

3435
switch (config.port) {
3536
case ESPEasySerialPort::serial0:
36-
#if SOC_UART_NUM > 1
37+
#if USABLE_SOC_UART_NUM > 1
3738
case ESPEasySerialPort::serial1:
38-
#endif // if SOC_UART_NUM > 1
39-
#if SOC_UART_NUM > 2
39+
#endif // if USABLE_SOC_UART_NUM > 1
40+
#if USABLE_SOC_UART_NUM > 2
4041
case ESPEasySerialPort::serial2:
41-
#endif // if SOC_UART_NUM > 2
42+
#endif // if USABLE_SOC_UART_NUM > 2
4243
_config.port = config.port;
4344
break;
4445
default:
@@ -55,14 +56,14 @@ void Port_ESPEasySerial_HardwareSerial_t::resetConfig(const ESPEasySerialConfig&
5556
} else if (_config.port == ESPEasySerialPort::serial0_swap) {
5657
_serial = &Serial;
5758
#endif // ifdef ESP8266
58-
#if SOC_UART_NUM > 1
59+
#if USABLE_SOC_UART_NUM > 1
5960
} else if (_config.port == ESPEasySerialPort::serial1) {
6061
_serial = &Serial1;
61-
#endif // if SOC_UART_NUM > 1
62-
#if SOC_UART_NUM > 2
62+
#endif // if USABLE_SOC_UART_NUM > 1
63+
#if USABLE_SOC_UART_NUM > 2
6364
} else if (_config.port == ESPEasySerialPort::serial2) {
6465
_serial = &Serial2;
65-
#endif // if SOC_UART_NUM > 2
66+
#endif // if USABLE_SOC_UART_NUM > 2
6667
} else {
6768
_config.port = ESPEasySerialPort::not_set;
6869
}

lib/HeatpumpIR/DaikinHeatpumpARC480A14IR.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ class DaikinHeatpumpARC480A14IR : public HeatpumpIR
4848
{
4949
public:
5050
DaikinHeatpumpARC480A14IR();
51-
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd);
51+
using HeatpumpIR::send;
52+
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd) override;
5253
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd, uint8_t comfortMode, uint8_t econo, uint8_t sensor, uint8_t quiet, uint8_t powerful);
5354
private:
5455
void sendDaikin(IRSender& IR, uint8_t operatingMode, uint8_t fanSpeed, uint8_t temperature, uint8_t swingV, uint8_t swingH, uint8_t comfortMode, uint8_t econo, uint8_t sensor, uint8_t quiet, uint8_t powerful);

0 commit comments

Comments
 (0)