aboutsummaryrefslogtreecommitdiff
path: root/ports/stm32/softtimer.c
AgeCommit message (Collapse)Author
2020-03-26stm32/softtimer: Initialise pairing-heap node before pushing to heap.Damien George
2020-02-28all: Reformat C and Python source code with tools/codeformat.py.Damien George
This is run with uncrustify 0.70.1, and black 19.10b0.
2020-01-22stm32/softtimer: Change linear linked list to a pairing heap.Damien George
2019-10-31stm32: Add soft timer implementation, using SysTick at 1ms resolution.Damien George
This commit adds an implementation of a "software timer" with a 1ms resolution, using SysTick. It allows unlimited number of concurrent timers (limited only by memory needed for each timer entry). They can be one-shot or periodic, and associated with a Python callback. There is a very small overhead added to the SysTick IRQ, which could be further optimised in the future, eg by patching SysTick_Handler code dynamically.