586: stm32: add `time-driver-any` cargo feature that automatically picks one. r=Dirbaio a=Dirbaio
Most of the time you don't care which one gets used, so this is easier! :)
It also helps for building docs for all chips, it reduces the feature changes needed.
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
Sequences are now passed in via the start method to avoid having to stop the PWM and restart it. Sequences continue to be constrained with the same lifetime of the Pwm object itself. The pwm_sequence example has been extended to illustrate multiple sequences being passed around.
581: stm32: expose all functionality as inherent methods. r=Dirbaio a=Dirbaio
This is the previous step to implementing both the embedded-hal 0.2 and embedded-hal 1.0 + embedded-hal-async traits.
The equivalent in nrf was done in #552
- Removes need for `unwrap` in gpio.
- Removes need for `use embedded_hal::whatever` in all cases.
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
582: Make advanced timer trait not require general purpose timer trait as … r=Dirbaio a=matoushybl
…the timers are too different.
When developing pwm driver, I originally used T: GeneralPurpose16bitTimer as it could support both GP timers and advanced timer, but advanced timer requires further modifications in registers accessible only in it (BDTR - bit AOE).
This PR makes advanced timers depend on Basic16bitTimer instead, which should hopefully improve type safety and allow for better timer drivers that can distinguish between advanced timers and general purpose ones.
Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
574: Add the possibility to reconfigure Spi mode and bit order configurati… r=matoushybl a=matoushybl
…on on the fly.
I have not tested these changes. I am also not sure if the peripheral should be disabled when changing these settings. What do you think `@Dirbaio` ?
Co-authored-by: Matous Hybl <hyblmatous@gmail.com>