Skip to content

Commit

Permalink
tests: Tweak SPI and UART tests to work with ESP32C6.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <[email protected]>
  • Loading branch information
dpgeorge committed Sep 25, 2024
1 parent c4d1daf commit a434c42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/extmod/machine_spi_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
elif "rp2" in sys.platform:
spi_instances = ((0, Pin(18), Pin(19), Pin(16)),)
elif "esp32" in sys.platform:
if "ESP32C3" in str(sys.implementation):
impl = str(sys.implementation)
if "ESP32C3" in impl or "ESP32C6" in impl:
spi_instances = ((1, Pin(4), Pin(5), Pin(6)),)
else:
spi_instances = ((1, Pin(18), Pin(19), Pin(21)), (2, Pin(18), Pin(19), Pin(21)))
Expand Down
3 changes: 2 additions & 1 deletion tests/extmod_hardware/machine_uart_irq_break.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

# Configure pins based on the target.
if "esp32" in sys.platform:
if "ESP32S2" in sys.implementation._machine or "ESP32C3" in sys.implementation._machine:
_machine = sys.implementation._machine
if "ESP32S2" in _machine or "ESP32C3" in _machine or "ESP32C6" in _machine:
print("SKIP")
raise SystemExit
# ESP32 needs separate UART instances for the test
Expand Down

0 comments on commit a434c42

Please sign in to comment.