Skip to content

Commit

Permalink
Merge pull request #317 from lucasssvaz/feat/new_p4_wokwi
Browse files Browse the repository at this point in the history
feat(wokwi): Use new board for ESP32-P4
  • Loading branch information
hfudev authored Nov 12, 2024
2 parents 63131fc + 08219d1 commit 626f37d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pytest-embedded-wokwi/pytest_embedded_wokwi/wokwi_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'esp32c3': 'board-esp32-c3-devkitm-1',
'esp32c6': 'board-esp32-c6-devkitc-1',
'esp32h2': 'board-esp32-h2-devkitm-1',
'esp32p4': 'board-esp32-p4-preview',
'esp32p4': 'board-esp32-p4-function-ev',
'esp32s2': 'board-esp32-s2-devkitm-1',
'esp32s3': 'board-esp32-s3-devkitc-1',
}
Expand Down Expand Up @@ -145,14 +145,21 @@ def create_diagram_json(self):
)
return

if app.target == 'esp32p4':
rx_pin = '38'
tx_pin = '37'
else:
rx_pin = 'RX'
tx_pin = 'TX'

diagram = {
'version': 1,
'author': 'Uri Shaked',
'editor': 'wokwi',
'parts': [{'type': target_board, 'id': 'esp'}],
'connections': [
['esp:TX', '$serialMonitor:RX', ''],
['esp:RX', '$serialMonitor:TX', ''],
['esp:' + tx_pin, '$serialMonitor:RX', ''],
['esp:' + rx_pin, '$serialMonitor:TX', ''],
],
}
with open(diagram_json_path, 'w') as f:
Expand Down

0 comments on commit 626f37d

Please sign in to comment.