From d2e5abd99bd4aa7c7463ece8e5303c69c35be683 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 0000000000000..7acef9376b0d2 --- /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 0000000000000..ce013625030ba --- /dev/null +++ b/tests/psoc6/timer.py.exp @@ -0,0 +1 @@ +hello