summaryrefslogtreecommitdiff
path: root/py/persistentcode.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-10-23 16:56:38 +1100
committerDamien George <damien.p.george@gmail.com>2019-10-31 22:12:55 +1100
commit48b25a841b04108d4dc399fad87b413f9f52c6bb (patch)
treef91cd3622604eb7310494e9412c847b62056e4eb /py/persistentcode.h
parenta5d97f1db95fff3c33fbb69300ad7e31cb6d0dd1 (diff)
stm32: Add machine.Timer with soft timer implementation.
This commit adds an implementation of machine.Timer backed by the soft timer mechanism. It allows an arbitrary number of timers with 1ms resolution, with an associated Python callback. The Python-level API matches existing ports that have a soft timer, and is used as: from machine import Timer t = Timer(freq=10, callback=lambda t:print(t)) ... t = Timer(mode=Timer.ONE_SHOT, period=2000, callback=lambda t:print(t)) ... t.deinit()
Diffstat (limited to 'py/persistentcode.h')
0 files changed, 0 insertions, 0 deletions