stm32-rs / stm32g0xx-hal

Peripheral access API for STM32G0 series microcontrollers
Apache License 2.0
73 stars 51 forks source link

Add more methods to Pwm<T> #140

Open usbalbin opened 1 year ago

usbalbin commented 1 year ago

Hi :)

I have a use case where I need to update the frequency of several pwm outputs very often, therefore I need access to directly setting the period and/or prescaler registers. This PR does that plus some extra methods like start/pause, and access to setting the prescaler.