From a434c42dda28f067d65080c18ae3325eee8e5714 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 25 Sep 2024 17:51:49 +1000 Subject: [PATCH] tests: Tweak SPI and UART tests to work with ESP32C6. Signed-off-by: Damien George --- tests/extmod/machine_spi_rate.py | 3 ++- tests/extmod_hardware/machine_uart_irq_break.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/extmod/machine_spi_rate.py b/tests/extmod/machine_spi_rate.py index 6ee4619fa119..19371d3bd7f5 100644 --- a/tests/extmod/machine_spi_rate.py +++ b/tests/extmod/machine_spi_rate.py @@ -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))) diff --git a/tests/extmod_hardware/machine_uart_irq_break.py b/tests/extmod_hardware/machine_uart_irq_break.py index 82879c1d6e4a..f255e0f0e672 100644 --- a/tests/extmod_hardware/machine_uart_irq_break.py +++ b/tests/extmod_hardware/machine_uart_irq_break.py @@ -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