Skip to content

Commit b115ace

Browse files
IDF master (#11289)
* fix(libs): Ensure compilation with ESP32-C5 * fix(i2c): Update I2C Slave init call * IDF master 465b159c * ci(simple_ble): Add check for BLE supported * IDF master 38628f98 --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
1 parent c9efce6 commit b115ace

File tree

14 files changed

+80
-55
lines changed

14 files changed

+80
-55
lines changed

cores/esp32/esp32-hal-i2c-slave.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "soc/i2c_struct.h"
4444
#include "soc/periph_defs.h"
4545
#include "hal/i2c_ll.h"
46+
#include "hal/i2c_types.h"
4647
#ifndef CONFIG_IDF_TARGET_ESP32C5
4748
#include "hal/clk_gate_ll.h"
4849
#endif
@@ -337,7 +338,13 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
337338
}
338339
#endif // !defined(CONFIG_IDF_TARGET_ESP32P4)
339340

341+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
342+
i2c_ll_set_mode(i2c->dev, I2C_BUS_MODE_SLAVE);
343+
i2c_ll_enable_pins_open_drain(i2c->dev, true);
344+
#else
340345
i2c_ll_slave_init(i2c->dev);
346+
#endif
347+
341348
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
342349
i2c_ll_enable_fifo_mode(i2c->dev, true);
343350
#else

idf_component.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ dependencies:
5757
version: "==1.6.3"
5858
require: public
5959
rules:
60-
- if: "target not in [esp32c2, esp32p4]"
60+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
6161
espressif/esp-zigbee-lib:
6262
version: "==1.6.3"
6363
require: public
6464
rules:
65-
- if: "target not in [esp32c2, esp32p4]"
65+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
6666
espressif/esp-dsp:
6767
version: "^1.3.4"
6868
rules:
@@ -73,32 +73,32 @@ dependencies:
7373
espressif/esp_rainmaker:
7474
version: "1.5.2"
7575
rules:
76-
- if: "target not in [esp32c2, esp32p4]"
76+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
7777
espressif/rmaker_common:
7878
version: "1.4.6"
7979
rules:
80-
- if: "target not in [esp32c2, esp32p4]"
80+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
8181
espressif/esp_insights:
8282
version: "1.2.2"
8383
rules:
84-
- if: "target not in [esp32c2, esp32p4]"
84+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
8585
# New version breaks esp_insights 1.0.1
8686
espressif/esp_diag_data_store:
8787
version: "1.0.2"
8888
rules:
89-
- if: "target not in [esp32c2, esp32p4]"
89+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
9090
espressif/esp_diagnostics:
9191
version: "1.2.1"
9292
rules:
93-
- if: "target not in [esp32c2, esp32p4]"
93+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
9494
espressif/cbor:
9595
version: "0.6.0~1"
9696
rules:
97-
- if: "target not in [esp32c2, esp32p4]"
97+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
9898
espressif/qrcode:
9999
version: "0.1.0~2"
100100
rules:
101-
- if: "target not in [esp32c2, esp32p4]"
101+
- if: "target not in [esp32c2, esp32p4, esp32c5]"
102102
# RainMaker End
103103
espressif/esp-sr:
104104
version: "^1.4.2"

libraries/BluetoothSerial/src/BTAddress.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
* Author: Thomas M. (ArcticSnowSky)
88
*/
99
#include "sdkconfig.h"
10-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
10+
#include "soc/soc_caps.h"
11+
12+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
1113

1214
#include "BTAddress.h"
1315
#include <string>

libraries/BluetoothSerial/src/BTAddress.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
#ifndef COMPONENTS_CPP_UTILS_BTADDRESS_H_
1111
#define COMPONENTS_CPP_UTILS_BTADDRESS_H_
1212
#include "sdkconfig.h"
13-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
13+
#include "soc/soc_caps.h"
14+
15+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
1416
#include <esp_gap_bt_api.h> // ESP32 BT
1517
#include <Arduino.h>
1618

libraries/BluetoothSerial/src/BTAdvertisedDevice.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
* Author: Thomas M. (ArcticSnowSky)
66
*/
77

8-
#ifndef __BTADVERTISEDDEVICE_H__
9-
#define __BTADVERTISEDDEVICE_H__
8+
#pragma once
9+
#include "sdkconfig.h"
10+
#include "soc/soc_caps.h"
1011

12+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
1113
#include "BTAddress.h"
1214
#include <string>
1315

libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
*/
77

88
#include "sdkconfig.h"
9-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
9+
#include "soc/soc_caps.h"
10+
11+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
1012

1113
//#include <map>
1214

libraries/BluetoothSerial/src/BTScan.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
* Author: Thomas M. (ArcticSnowSky)
66
*/
77

8-
#ifndef __BTSCAN_H__
9-
#define __BTSCAN_H__
8+
#pragma once
9+
#include "sdkconfig.h"
10+
#include "soc/soc_caps.h"
11+
12+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
1013

1114
#include <map>
1215
#include <string>

libraries/BluetoothSerial/src/BTScanResultsSet.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
*/
77

88
#include "sdkconfig.h"
9-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
9+
#include "soc/soc_caps.h"
10+
11+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
1012

1113
#include <esp_err.h>
1214

libraries/BluetoothSerial/src/BluetoothSerial.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
#include <cstring>
2020
#include "freertos/FreeRTOS.h"
2121
#include "freertos/task.h"
22+
#include "soc/soc_caps.h"
2223

23-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
24+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
2425

2526
#ifdef ARDUINO_ARCH_ESP32
2627
#include "esp32-hal-log.h"

libraries/BluetoothSerial/src/BluetoothSerial.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
#define _BLUETOOTH_SERIAL_H_
1717

1818
#include "sdkconfig.h"
19+
#include "soc/soc_caps.h"
1920

20-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
21+
#if SOC_BT_SUPPORTED && defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
2122

2223
#include "Arduino.h"
2324
#include "Stream.h"

0 commit comments

Comments
 (0)