embassy-nrf

Crates

git

Versions

nrf5340-app-s

Flavors

Module pwm

Source
Expand description

Pulse Width Modulation (PWM) driver.

Structs§

Config
Configuration for the PWM as a whole.
Sequence
A composition of a sequence buffer and its configuration.
SequenceConfig
Configuration per sequence
SequencePwm
SequencePwm allows you to offload the updating of a sequence of duty cycles to up to four channels, as well as repeat that sequence n times.
Sequencer
A composition of sequences that can be started and stopped. Takes at least one sequence along with its configuration. Optionally takes a second sequence and its configuration. In the case where no second sequence is provided then the first sequence is used.
SimplePwm
SimplePwm is the traditional pwm interface you’re probably used to, allowing to simply set a duty cycle across up to four channels.
SingleSequencer
A single sequence that can be started and stopped. Takes one sequence along with its configuration.

Enums§

CounterMode
Selects up mode or up-and-down mode for the counter
Error
PWM error
Prescaler
PWM Base clock is system clock (16MHz) divided by prescaler
SequenceLoad
How the sequence values are distributed across the channels
SequenceMode
How many loops to run two sequences
SingleSequenceMode
How many times to run a single sequence
StartSequence
Which sequence to start a loop with

Constants§

PWM_CLK_HZ
The used pwm clock frequency

Traits§

Instance
PWM peripheral instance.