Skip to content

Commit

Permalink
test(adc): add esp32s3
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Jun 11, 2024
1 parent 7fd1b9a commit 43a6a14
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
22 changes: 19 additions & 3 deletions test/diagram.esp32s3.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@
"version": 1,
"author": "Uri Shaked",
"editor": "wokwi",
"parts": [ { "type": "board-esp32-s3-devkitc-1", "id": "esp", "top": 0, "left": 0, "attrs": {} } ],
"connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ],
"parts": [
{ "type": "board-esp32-s3-devkitc-1", "id": "esp", "top": 0, "left": 0, "attrs": {} },
{
"type": "wokwi-slide-potentiometer",
"id": "pot1",
"top": 86.6,
"left": -235.8,
"rotate": 180,
"attrs": { "travelLength": "30", "value": "512" }
}
],
"connections": [
[ "esp:TX", "$serialMonitor:RX", "", [] ],
[ "esp:RX", "$serialMonitor:TX", "", [] ],
[ "esp:GND.1", "pot1:GND", "black", [ "h0" ] ],
[ "esp:3V3.2", "pot1:VCC", "red", [ "h-24.28", "v115.02" ] ],
[ "esp:11", "pot1:SIG", "green", [ "h-14.68", "v-48.18" ] ]
],
"dependencies": {}
}
}
8 changes: 5 additions & 3 deletions test/test_adc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
expected_text = {
"esp32": expected_adc2_0,
"esp32s2": expected_adc2_0,
"esp32s3": expected_adc2_0, # Currently broken
"esp32s3": expected_adc2_0,
"esp32c3": expected_adc1_3,
"esp32c6": expected_adc1_3,
"esp32h2": expected_adc1_3,
"esp32p4": expected_adc1_3, # ESP-IDF does not yet support ADC on the ESP32-P4
}


@pytest.mark.parametrize("chip", ["esp32", "esp32s2", "esp32c3", "esp32c6", "esp32h2"])
@pytest.mark.parametrize(
"chip", ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6", "esp32h2"]
)
def test_hello_world(chip: str):

# Run the Wokwi CLI
Expand All @@ -26,7 +28,7 @@ def test_hello_world(chip: str):
"--elf",
f"../bin/{chip}/idf/latest/examples/peripherals/adc/oneshot_read/firmware.uf2",
"--timeout",
"60000",
"5000",
"--expect-text",
expected_text[chip],
"--diagram-file",
Expand Down

0 comments on commit 43a6a14

Please sign in to comment.