stm32f103xx-hal icon indicating copy to clipboard operation
stm32f103xx-hal copied to clipboard

Changing PWM frequency

Open TeXitoi opened this issue 7 years ago • 1 comments
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.

TeXitoi avatar Jul 28 '18 18:07 TeXitoi

I didn't see, but that's 'just' implement the embedded_hal::Pwm trait.

TeXitoi avatar Jul 28 '18 20:07 TeXitoi