Skip to content

Commit f75b7db

Browse files
committed
test(wokwi): Add I2C master test
1 parent 79e4445 commit f75b7db

10 files changed

+456
-0
lines changed

Diff for: tests/validation/i2c_master/ci.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"platforms": {
3+
"hardware": false,
4+
"qemu": false
5+
},
6+
"requires": [
7+
"CONFIG_SOC_I2C_SUPPORTED=y"
8+
]
9+
}

Diff for: tests/validation/i2c_master/diagram.esp32.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": 1,
3+
"author": "lucasssvaz",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-devkit-c-v4",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ds1307", "id": "rtc1", "top": -43.8, "left": -19.1, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
17+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
18+
[ "esp32:22", "rtc1:SCL", "green", [ "h38.4", "v-9.6" ] ],
19+
[ "esp32:21", "rtc1:SDA", "blue", [ "h48", "v-28.8", "h19.2" ] ],
20+
[ "esp32:GND.2", "rtc1:GND", "black", [ "v0" ] ],
21+
[ "rtc1:5V", "esp32:5V", "red", [ "h-28.8", "v-67.6", "h-172.8", "v230.4" ] ]
22+
],
23+
"dependencies": {}
24+
}

Diff for: tests/validation/i2c_master/diagram.esp32c3.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"version": 1,
3+
"author": "lucasssvaz",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-c3-devkitm-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ds1307", "id": "rtc1", "top": -43.8, "left": -19.1, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
17+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
18+
[ "rtc1:5V", "esp32:5V", "red", [ "h-28.8", "v-67.6", "h-172.8", "v230.4" ] ],
19+
[ "esp32:5V.1", "rtc1:5V", "red", [ "h-18.22", "v-144.3", "h153.6", "v48" ] ],
20+
[ "esp32:GND.10", "rtc1:GND", "black", [ "h56.16", "v9.3" ] ],
21+
[ "esp32:8", "rtc1:SDA", "green", [ "h17.76", "v-19.5" ] ],
22+
[ "esp32:9", "rtc1:SCL", "blue", [ "h0" ] ]
23+
],
24+
"dependencies": {}
25+
}

Diff for: tests/validation/i2c_master/diagram.esp32c6.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": 1,
3+
"author": "lucasssvaz",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-c6-devkitc-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ds1307", "id": "rtc1", "top": -43.8, "left": -19.1, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
17+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
18+
[ "rtc1:5V", "esp32:5V", "red", [ "h-28.8", "v-67.6", "h-172.8", "v230.4" ] ],
19+
[ "esp32:5V.1", "rtc1:5V", "red", [ "h-18.22", "v-144.3", "h153.6", "v48" ] ],
20+
[ "esp32:GND.10", "rtc1:GND", "black", [ "h56.16", "v9.3" ] ],
21+
[ "esp32:23", "rtc1:SDA", "green", [ "h17.38", "v-23.51" ] ],
22+
[ "esp32:GND.4", "rtc1:GND", "black", [ "h55.78", "v-4.31" ] ],
23+
[ "esp32:22", "rtc1:SCL", "blue", [ "h26.98", "v-23.51" ] ]
24+
],
25+
"dependencies": {}
26+
}

Diff for: tests/validation/i2c_master/diagram.esp32h2.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": 1,
3+
"author": "lucasssvaz",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-h2-devkitm-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ds1307", "id": "rtc1", "top": -43.8, "left": -19.1, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
17+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
18+
[ "esp32:GND.6", "rtc1:GND", "black", [ "h0" ] ],
19+
[ "esp32:5V", "rtc1:5V", "red", [ "h-29.14", "v-160.97", "h172.8", "v48" ] ],
20+
[ "esp32:12", "rtc1:SDA", "green", [ "h36.58", "v-36.17" ] ],
21+
[ "esp32:22", "rtc1:SCL", "blue", [ "v-7.37", "h46.18", "v-38.4" ] ]
22+
],
23+
"dependencies": {}
24+
}

Diff for: tests/validation/i2c_master/diagram.esp32p4.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": 1,
3+
"author": "lucasssvaz",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-p4-function-ev",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ds1307", "id": "rtc1", "top": -197.4, "left": 57.7, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp32:38", "$serialMonitor:TX", "", [] ],
17+
[ "esp32:37", "$serialMonitor:RX", "", [] ],
18+
[ "esp32:5V.1", "rtc1:5V", "red", [ "v0" ] ],
19+
[ "esp32:GND.1", "rtc1:GND", "black", [ "v-133.52", "h5.53" ] ],
20+
[ "esp32:7", "rtc1:SDA", "green", [ "v0" ] ],
21+
[ "esp32:8", "rtc1:SCL", "blue", [ "h15.13", "v-114.12" ] ]
22+
],
23+
"dependencies": {}
24+
}

Diff for: tests/validation/i2c_master/diagram.esp32s2.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": 1,
3+
"author": "lucasssvaz",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-s2-devkitm-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ds1307", "id": "rtc1", "top": -43.8, "left": -19.1, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
17+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
18+
[ "esp32:GND.2", "rtc1:GND", "black", [ "v0" ] ],
19+
[ "rtc1:5V", "esp32:5V", "red", [ "h-28.8", "v-67.6", "h-172.8", "v230.4" ] ],
20+
[ "esp32:8", "rtc1:SDA", "green", [ "h-19.47", "v-119.51", "h144", "v57.6" ] ],
21+
[ "esp32:9", "rtc1:SCL", "blue", [ "h-29.07", "v-138.71", "h144", "v76.8" ] ]
22+
],
23+
"dependencies": {}
24+
}

Diff for: tests/validation/i2c_master/diagram.esp32s3.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": 1,
3+
"author": "lucasssvaz",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-s3-devkitc-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-ds1307", "id": "rtc1", "top": -43.8, "left": -19.1, "attrs": {} }
14+
],
15+
"connections": [
16+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
17+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
18+
[ "esp32:GND.2", "rtc1:GND", "black", [ "v0" ] ],
19+
[ "rtc1:5V", "esp32:5V", "red", [ "h-28.8", "v-67.6", "h-172.8", "v230.4" ] ],
20+
[ "esp32:8", "rtc1:SDA", "green", [ "h-19.47", "v-119.51", "h144", "v32.93", "h38.35" ] ],
21+
[ "esp32:9", "rtc1:SCL", "blue", [ "h-29.07", "v-138.71", "h144", "v32.93", "h47.95" ] ]
22+
],
23+
"dependencies": {}
24+
}

0 commit comments

Comments
 (0)