Module pwm

Source
Expand description

Pulse wave modulation (PWM) driver for RP2040.

§Hardware Interface Layer (HIL)

The driver implements both Pwm and PwmPin HILs. The following features are available when using the driver through HIL:

  • Configurable top and compare values
  • Independent configuration for each channel and for each output/input pin
  • Duty cycle from 0% to 100% inclusive

§Examples

The integration tests for Raspberry Pi Pico provide some examples using the driver. See boards/raspberry_pi_pico/src/test/pwm.rs

Modules§

unit_tests
Unit tests

Structs§

Pwm
Main struct for controlling PWM peripheral
PwmPin
Helper structure to control a PWM pin

Enums§

ChannelNumber
Channel identifier
ChannelPin
Identifier for a channel pin
DivMode
Fractional clock divider running mode