aboutsummaryrefslogtreecommitdiffstats
path: root/src/rp2040/hard_pwm.c
Commit message (Collapse)AuthorAgeFilesLines
* rp2040: hardware PWM supportLasse Dalegaard2021-07-091-0/+101
This implements hardware PWM support for the rp2040. The maximum value(100% duty) is set to 255 to match the other controllers. Cycle time is clamped automatically, and uses the full 8.4 fractional range of the rp2040 PWM block. This allows a maximum PWM frequency of 490kHz and a minimum frequency of 1915 Hz. Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>