Skip to content

make Compiling with ESP-IDF 5.2.2 again #9882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# idf.py build

set(min_supported_idf_version "5.1.0")
set(max_supported_idf_version "5.1.99")
set(max_supported_idf_version "5.2.99")
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}")

if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}")
Expand Down
2 changes: 2 additions & 0 deletions cores/esp32/Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
class Client : public Stream {
public:
virtual int connect(IPAddress ip, uint16_t port) = 0;
virtual int connect(IPAddress ip, uint16_t port, int32_t timeout) = 0;
virtual int connect(const char *host, uint16_t port) = 0;
virtual int connect(const char *host, uint16_t port, int32_t timeout) = 0;
virtual size_t write(uint8_t) = 0;
virtual size_t write(const uint8_t *buf, size_t size) = 0;
virtual int available() = 0;
Expand Down
10 changes: 5 additions & 5 deletions cores/esp32/esp32-hal-i2c-slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
}

i2c_ll_slave_init(i2c->dev);
i2c_ll_set_fifo_mode(i2c->dev, true);
i2c_ll_set_data_mode(i2c->dev, I2C_DATA_MODE_MSB_FIRST, I2C_DATA_MODE_MSB_FIRST);
i2c_ll_set_slave_addr(i2c->dev, slaveID, false);
i2c_ll_set_tout(i2c->dev, I2C_LL_MAX_TIMEOUT);
i2c_slave_set_frequency(i2c, frequency);
Expand All @@ -337,7 +337,7 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t

i2c_ll_disable_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
i2c_ll_clear_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
i2c_ll_set_fifo_mode(i2c->dev, true);
i2c_ll_set_data_mode(i2c->dev, I2C_DATA_MODE_MSB_FIRST, I2C_DATA_MODE_MSB_FIRST);

if (!i2c->intr_handle) {
uint32_t flags = ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED;
Expand Down Expand Up @@ -515,16 +515,16 @@ static bool i2c_slave_set_frequency(i2c_slave_struct_t *i2c, uint32_t clk_speed)

i2c_hal_clk_config_t clk_cal;
#if SOC_I2C_SUPPORT_APB
i2c_ll_cal_bus_clk(APB_CLK_FREQ, clk_speed, &clk_cal);
i2c_ll_master_cal_bus_clk(APB_CLK_FREQ, clk_speed, &clk_cal);
i2c_ll_set_source_clk(i2c->dev, SOC_MOD_CLK_APB); /*!< I2C source clock from APB, 80M*/
#elif SOC_I2C_SUPPORT_XTAL
i2c_ll_cal_bus_clk(XTAL_CLK_FREQ, clk_speed, &clk_cal);
i2c_ll_set_source_clk(i2c->dev, SOC_MOD_CLK_XTAL); /*!< I2C source clock from XTAL, 40M */
#endif
i2c_ll_set_txfifo_empty_thr(i2c->dev, a);
i2c_ll_set_rxfifo_full_thr(i2c->dev, SOC_I2C_FIFO_LEN - a);
i2c_ll_set_bus_timing(i2c->dev, &clk_cal);
i2c_ll_set_filter(i2c->dev, 3);
i2c_ll_master_set_bus_timing(i2c->dev, &clk_cal);
i2c_ll_master_set_filter(i2c->dev, 3);
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ files:
- "platform.txt"
- "programmers.txt"
dependencies:
idf: ">=5.1,<5.2"
idf: ">=5.1,<5.3"
# mdns 1.2.1 is necessary to build H2 with no WiFi
espressif/mdns:
version: "^1.2.3"
Expand Down
4 changes: 2 additions & 2 deletions libraries/ESP_I2S/src/ESP_I2S.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define I2S_READ_CHUNK_SIZE 1920

#define I2S_DEFAULT_CFG() \
{ .id = I2S_NUM_AUTO, .role = I2S_ROLE_MASTER, .dma_desc_num = 6, .dma_frame_num = 240, .auto_clear = true, }
{ .id = I2S_NUM_AUTO, .role = I2S_ROLE_MASTER, .dma_desc_num = 6, .dma_frame_num = 240, .auto_clear = true, .intr_priority = 0, }

#define I2S_STD_CHAN_CFG(_sample_rate, _data_bit_width, _slot_mode) \
{ \
Expand Down Expand Up @@ -819,7 +819,7 @@ size_t I2SClass::readBytes(char *buffer, size_t size) {
return total_size;
}

size_t I2SClass::write(uint8_t *buffer, size_t size) {
size_t I2SClass::write(const uint8_t *buffer, size_t size) {
size_t written = 0;
size_t bytes_sent = 0;
last_error = ESP_FAIL;
Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP_I2S/src/ESP_I2S.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class I2SClass : public Stream {
bool end();

size_t readBytes(char *buffer, size_t size);
size_t write(uint8_t *buffer, size_t size);
size_t write(const uint8_t *buffer, size_t size);

i2s_chan_handle_t txChan();
uint32_t txSampleRate();
Expand Down
2 changes: 2 additions & 0 deletions libraries/Network/src/NetworkClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class NetworkClientRxBuffer;

class ESPLwIPClient : public Client {
public:
virtual int connect(IPAddress ip, uint16_t port) = 0;
virtual int connect(IPAddress ip, uint16_t port, int32_t timeout) = 0;
virtual int connect(const char *host, uint16_t port) = 0;
virtual int connect(const char *host, uint16_t port, int32_t timeout) = 0;
virtual void setConnectionTimeout(uint32_t milliseconds) = 0;
};
Expand Down
Loading