File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 9
9
# A range of sleep periods (1 to 512ms) are tested. The total nominal sleep time
10
10
# is 10.23 seconds, but on most ports this will finish much earlier as interrupts
11
11
# happen before each timeout expires.
12
- import sys
13
-
14
12
try :
15
13
from machine import lightsleep , Pin
16
14
except ImportError :
17
15
print ("SKIP" )
18
16
raise SystemExit
19
17
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
24
19
25
20
try :
26
21
led = Pin (Pin .board .LED , Pin .OUT )
30
25
for n in range (100 ):
31
26
if led :
32
27
led .toggle ()
33
- sys . stdout .write (chr (ord ("a" ) + (n % 26 )))
28
+ stdout .write (chr (ord ("a" ) + (n % 26 )))
34
29
lightsleep (2 ** (n % 10 ))
35
30
36
31
print ("\n DONE" )
Original file line number Diff line number Diff line change 1
- import sys
2
1
import machine
3
2
import time
4
3
18
17
# Verification uses the average idle time, as individual iterations will always
19
18
# have outliers due to interrupts, scheduler, etc.
20
19
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
-
26
20
ITERATIONS = 500
27
21
total = 0
28
22
You can’t perform that action at this time.
0 commit comments