IntervalTimer library

OK folks, it is DONE!! The SparkIntervalTimer library is now available for all your grubby little hands. I consider this a start but right now, you can grab an interval timer from a pool of three (TIM2, TIM3 or TIM4), pass it a callback and give it a period and it calls your code at that interval. When your done, the timer is returned to the pool. Due to the way the timers work, there are two timescales - 1-65535 microseconds and 1-65535 half milliseconds (or max of 32767 milliseconds). The code could be adapted to setup the timers for PWM also but that can come later. The code compiles both locally and on the web IDE.

If you are interested, the code is available on my github. Your feedback and ideas are greatly appreciated. :smiley:

8 Likes