diff options
author | Damien George <damien@micropython.org> | 2021-04-21 14:06:14 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-04-21 14:22:09 +1000 |
commit | 00d6a79b3d5dc80d840dc1d51166e7d95856b3d6 (patch) | |
tree | ff1dd9739d8e9d0d898ac2c8240de551197bf208 /tests/esp32/esp32_nvs.py | |
parent | 6e0f9b9262a2948391704d53eafec8d2bd2e5ad2 (diff) | |
download | micropython-00d6a79b3d5dc80d840dc1d51166e7d95856b3d6.tar.gz micropython-00d6a79b3d5dc80d840dc1d51166e7d95856b3d6.zip |
stm32/machine_timer: Improve usability of Timer constructor and init.
Improvements are:
- Default period is 1000ms with callback disabled.
- if period is not specified then it's not updated (previously, if period
was not specified then it was set to -1 and running the timer callback as
fast as possible, making the REPL unresponsive).
- Use uint64_t to compute delta_ms, and raise a ValueError if the period is
too large.
- If callback is not specified then it's not updated.
- Specifying None for the callback will disable the timer.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/esp32/esp32_nvs.py')
0 files changed, 0 insertions, 0 deletions