Closed bobmcwhirter closed 3 years ago
fwiw, the benefit of this is providing a way for HAL Timer's to cycle at less often than 1 second.
Hiya-- just checking in.
Thanks for this! Honestly, it's been ages since I've had time to look at this code (or any Rust) and been deep in C++ for far too long. I've never dealt with sub-hertz time in embedded applications (I guess I would tend to just switch over to period), and I can't remember off the top of my head whether it's even possible to specify a Timer/Clock period rather than frequency. In any case, I think it would be a good add for consistency alone.
Ping @PTaylor-us
@bobmcwhirter Thanks again!
Adds support for sub-Hertz rates to allow for conversion of durations longer than 1 second to non-0 Hertz values.
e.g.
1 sec -> 1,000 millihertz 2 sec -> 500 millihertz 1,000 sec -> 1 millihertz