Skip to content

Commit f6bcb39

Browse files
authored
Merge branch 'master' into release/v3.3.x
2 parents b759424 + fb5f11b commit f6bcb39

File tree

3 files changed

+54
-6
lines changed

3 files changed

+54
-6
lines changed

Diff for: cores/esp32/esp32-hal-misc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "esp_ota_ops.h"
2626
#endif //CONFIG_APP_ROLLBACK_ENABLE
2727
#include "esp_private/startup_internal.h"
28-
#ifdef CONFIG_BT_ENABLED
28+
#if defined(CONFIG_BT_ENABLED) && SOC_BT_SUPPORTED
2929
#include "esp_bt.h"
3030
#endif //CONFIG_BT_ENABLED
3131
#include <sys/time.h>
@@ -307,7 +307,7 @@ void initArduino() {
307307
if (err) {
308308
log_e("Failed to initialize NVS! Error: %u", err);
309309
}
310-
#ifdef CONFIG_BT_ENABLED
310+
#if defined(CONFIG_BT_ENABLED) && SOC_BT_SUPPORTED
311311
if (!btInUse()) {
312312
esp_bt_controller_mem_release(ESP_BT_MODE_BTDM);
313313
}

Diff for: idf_component.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,24 @@ dependencies:
7171
espressif/network_provisioning:
7272
version: "1.0.2"
7373
espressif/esp_rainmaker:
74-
version: "1.5.0"
74+
version: "1.5.2"
7575
rules:
7676
- if: "target not in [esp32c2, esp32p4]"
7777
espressif/rmaker_common:
7878
version: "1.4.6"
7979
rules:
8080
- if: "target not in [esp32c2, esp32p4]"
8181
espressif/esp_insights:
82-
version: "1.0.1"
82+
version: "1.2.2"
8383
rules:
8484
- if: "target not in [esp32c2, esp32p4]"
8585
# New version breaks esp_insights 1.0.1
8686
espressif/esp_diag_data_store:
87-
version: "1.0.1"
87+
version: "1.0.2"
8888
rules:
8989
- if: "target not in [esp32c2, esp32p4]"
9090
espressif/esp_diagnostics:
91-
version: "1.0.2"
91+
version: "1.2.1"
9292
rules:
9393
- if: "target not in [esp32c2, esp32p4]"
9494
espressif/cbor:

Diff for: tests/validation/i2c_master/i2c_master.ino

+48
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
#include <Arduino.h>
66
#include <unity.h>
77
#include <Wire.h>
8+
#include <vector>
9+
#include <algorithm>
10+
#include <WiFi.h>
11+
12+
#include "sdkconfig.h"
813

914
/* DS1307 functions */
1015

@@ -24,6 +29,9 @@ static uint8_t read_month = 0;
2429
static uint16_t read_year = 0;
2530
static int peek_data = -1;
2631

32+
const char *ssid = "Wokwi-GUEST";
33+
const char *password = "";
34+
2735
const auto BCD2DEC = [](uint8_t num) -> uint8_t {
2836
return ((num / 16 * 10) + (num % 16));
2937
};
@@ -245,6 +253,42 @@ void test_api() {
245253
Wire.flush();
246254
}
247255

256+
bool device_found() {
257+
uint8_t err;
258+
259+
for (uint8_t address = 1; address < 127; ++address) {
260+
Wire.beginTransmission(address);
261+
err = Wire.endTransmission();
262+
log_d("Address: 0x%02X, Error: %d", address, err);
263+
if (err == 0) {
264+
log_i("Found device at address: 0x%02X", address);
265+
} else if (address == DS1307_ADDR) {
266+
log_e("Failed to find DS1307");
267+
return false;
268+
}
269+
}
270+
271+
return true;
272+
}
273+
274+
void scan_bus() {
275+
TEST_ASSERT_TRUE(device_found());
276+
}
277+
278+
#if SOC_WIFI_SUPPORTED
279+
void scan_bus_with_wifi() {
280+
// delete old config
281+
WiFi.disconnect(true, true, 1000);
282+
delay(1000);
283+
WiFi.begin(ssid, password);
284+
delay(5000);
285+
bool found = device_found();
286+
WiFi.disconnect(true, true, 1000);
287+
288+
TEST_ASSERT_TRUE(found);
289+
}
290+
#endif
291+
248292
/* Main */
249293

250294
void setup() {
@@ -258,6 +302,10 @@ void setup() {
258302

259303
log_d("Starting tests");
260304
UNITY_BEGIN();
305+
RUN_TEST(scan_bus);
306+
#if SOC_WIFI_SUPPORTED
307+
RUN_TEST(scan_bus_with_wifi);
308+
#endif
261309
RUN_TEST(rtc_set_time);
262310
RUN_TEST(rtc_run_clock);
263311
RUN_TEST(change_clock);

0 commit comments

Comments
 (0)