summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/pyb/timer.py6
-rw-r--r--tests/pyb/timer.py.exp2
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/pyb/timer.py b/tests/pyb/timer.py
index 61320690a..e83550abd 100644
--- a/tests/pyb/timer.py
+++ b/tests/pyb/timer.py
@@ -11,3 +11,9 @@ tim.prescaler(300)
print(tim.prescaler())
tim.period(400)
print(tim.period())
+
+# Setting and printing frequency
+tim = Timer(2, freq=100)
+print(tim.freq())
+tim.freq(0.001)
+print(tim.freq())
diff --git a/tests/pyb/timer.py.exp b/tests/pyb/timer.py.exp
index 5c4623030..7602bbd70 100644
--- a/tests/pyb/timer.py.exp
+++ b/tests/pyb/timer.py.exp
@@ -2,3 +2,5 @@
200
300
400
+100
+0.001