From fb4ae1eeec521d3d0caf09ba234df3a4e98902e2 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 14 Aug 2024 14:20:36 +1000 Subject: [PATCH] test/extmod: Fix machine_spi_rate test on ESP32-C3. Update to the test added in 1e98c4cb75bf3015d816455fc46ba28d5bcd9275, changes the SPI pins for ESP32-C3 (IO 18 and 19 are the native USB pins). Signed-off-by: Angus Gratton --- tests/extmod/machine_spi_rate.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/extmod/machine_spi_rate.py b/tests/extmod/machine_spi_rate.py index df9e3fbd0d..6ee4619fa1 100644 --- a/tests/extmod/machine_spi_rate.py +++ b/tests/extmod/machine_spi_rate.py @@ -21,11 +21,10 @@ if "pyboard" in sys.platform: elif "rp2" in sys.platform: spi_instances = ((0, Pin(18), Pin(19), Pin(16)),) elif "esp32" in sys.platform: - spi_instances = [ - (1, Pin(18), Pin(19), Pin(21)), - ] - if "ESP32C3" not in str(sys.implementation): - spi_instances.append((2, Pin(18), Pin(19), Pin(21))) + if "ESP32C3" in str(sys.implementation): + 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))) else: print("Please add support for this test on this platform.") raise SystemExit