Skip to content

Commit 9c496a0

Browse files
committed
tests/ports/rp2: Put back lightsleep/machine_idle test for RP2350.
This reverts commit b42bb91. Signed-off-by: Peter Harper <[email protected]>
1 parent 6b30f8d commit 9c496a0

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

tests/ports/rp2/rp2_lightsleep.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,13 @@
99
# A range of sleep periods (1 to 512ms) are tested. The total nominal sleep time
1010
# is 10.23 seconds, but on most ports this will finish much earlier as interrupts
1111
# happen before each timeout expires.
12-
import sys
13-
1412
try:
1513
from machine import lightsleep, Pin
1614
except ImportError:
1715
print("SKIP")
1816
raise SystemExit
1917

20-
# RP2350 currently fails this test, needs further investigation.
21-
if "RP2350" in sys.implementation._machine:
22-
print("SKIP")
23-
raise SystemExit
18+
from sys import stdout, platform
2419

2520
try:
2621
led = Pin(Pin.board.LED, Pin.OUT)
@@ -30,7 +25,7 @@
3025
for n in range(100):
3126
if led:
3227
led.toggle()
33-
sys.stdout.write(chr(ord("a") + (n % 26)))
28+
stdout.write(chr(ord("a") + (n % 26)))
3429
lightsleep(2 ** (n % 10))
3530

3631
print("\nDONE")

tests/ports/rp2/rp2_machine_idle.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
import machine
32
import time
43

@@ -18,11 +17,6 @@
1817
# Verification uses the average idle time, as individual iterations will always
1918
# have outliers due to interrupts, scheduler, etc.
2019

21-
# RP2350 currently fails this test because machine.idle() resumes immediately.
22-
if "RP2350" in sys.implementation._machine:
23-
print("SKIP")
24-
raise SystemExit
25-
2620
ITERATIONS = 500
2721
total = 0
2822

0 commit comments

Comments
 (0)