diff options
Diffstat (limited to 'tests/pyb/timer.py')
-rw-r--r-- | tests/pyb/timer.py | 6 |
1 files changed, 6 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()) |