stm32f0xx-hal
stm32f0xx-hal copied to clipboard
Improvements to the time and watchdog interface
- Add types for
MicroSeconds
,MilliSeconds
andSeconds
to time.rs and add conversions between them (the ones that don't loose precision while converting. - Update the
IwdgTimeout
struct to be able to construct it from any type that implementsInto<MicroSeconds>
(The old parameter inHertz
can still be used since Hertz implementsInto<MicroSeconds>
as well)
There is probably some more interfaces that could benefit from a similar change in generic parameters to also support (Micro/Milli)Seconds instead of only Hertz. Feel free to list them here and I'll try to add/change them if i got some time