summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-08-14 14:20:36 +1000
committerDamien George <damien@micropython.org>2024-08-14 15:03:27 +1000
commitfb4ae1eeec521d3d0caf09ba234df3a4e98902e2 (patch)
tree768ad79a1d95b2519c408a060be73726ef0a9bee
parenta6fa85d8f96897863546423b2bbfc2c24237040f (diff)
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 <angus@redyak.com.au>
-rw-r--r--tests/extmod/machine_spi_rate.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/extmod/machine_spi_rate.py b/tests/extmod/machine_spi_rate.py
index df9e3fbd0..6ee4619fa 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