forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/psoc6: Skipping tests requiring fix.
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
- Loading branch information
1 parent
66535d0
commit a1f1f06
Showing
2 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
import time | ||
from machine import Timer | ||
import os | ||
|
||
machine = os.uname().machine | ||
if "CY8CPROTO-063-BLE" in machine: | ||
# TODO: Not working for this board. Neither the timer timing is correct | ||
print("SKIP") | ||
raise SystemExit | ||
|
||
t = Timer(0) | ||
t.init(period=2000, mode=Timer.ONE_SHOT, callback=lambda t: print("Oneshot Timer")) | ||
time.sleep(3) | ||
t.deinit() | ||
|
||
# TODO the whole time functionality is not really working... | ||
# def blocking_delay_ms(delay_ms): | ||
# start = time.ticks_ms() | ||
# while time.ticks_diff(time.ticks_ms(), start) < delay_ms: | ||
# pass | ||
|
||
# t1 = Timer(0) | ||
# t1.init(period=2000, mode=Timer.PERIODIC, callback=lambda t: print("Periodic Timer")) | ||
# blocking_delay_ms(2000) | ||
# t.deinit() | ||
def blocking_delay_ms(delay_ms): | ||
start = time.ticks_ms() | ||
while time.ticks_diff(time.ticks_ms(), start) < delay_ms: | ||
pass | ||
|
||
|
||
t1 = Timer(0) | ||
t1.init(period=2000, mode=Timer.PERIODIC, callback=lambda t: print("Periodic Timer")) | ||
blocking_delay_ms(2000) | ||
t.deinit() |