From eebccdb6d696db431392fb475560918706a2826a Mon Sep 17 00:00:00 2001 From: enriquezgarc Date: Thu, 13 Jul 2023 16:40:30 +0200 Subject: [PATCH] test/psoc6/timer.py: Added basic timer test. Signed-off-by: enriquezgarc --- tests/psoc6/timer.py | 6 ++++++ tests/psoc6/timer.py.exp | 1 + 2 files changed, 7 insertions(+) create mode 100644 tests/psoc6/timer.py create mode 100644 tests/psoc6/timer.py.exp diff --git a/tests/psoc6/timer.py b/tests/psoc6/timer.py new file mode 100644 index 000000000000..7acef9376b0d --- /dev/null +++ b/tests/psoc6/timer.py @@ -0,0 +1,6 @@ +import time +from machine import Timer + +t = Timer(0) +t.init(period=2000, mode=Timer.ONE_SHOT, callback=lambda t: print("hello")) +time.sleep_ms(3000) diff --git a/tests/psoc6/timer.py.exp b/tests/psoc6/timer.py.exp new file mode 100644 index 000000000000..ce013625030b --- /dev/null +++ b/tests/psoc6/timer.py.exp @@ -0,0 +1 @@ +hello