stm32f103xx-hal
stm32f103xx-hal copied to clipboard
Changing PWM frequency
trafficstars
Hi!
I need to change PWM frequency, but the API doesn't allow it. The main problem is that changing the frequency change the frequency of all the channels, and there is no PwmTimer object.
Maybe instead of returning a tuple, an object should be returned that allow to access to the channels, allow to change the frequency, and extract the Pwm objects.
If that's OK, we can talk about the details (breaking change or not, tuple struct with public fields or Into<(Pwm1, Pwm2)>...) and I can take care of the implementation.
I didn't see, but that's 'just' implement the embedded_hal::Pwm trait.