pub struct SequencePwm<'d, T: Instance> { /* private fields */ }
Expand description
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.
Implementations§
Source§impl<'d, T: Instance> SequencePwm<'d, T>
impl<'d, T: Instance> SequencePwm<'d, T>
Sourcepub fn new_1ch(
pwm: impl Peripheral<P = T> + 'd,
ch0: impl Peripheral<P = impl GpioPin> + 'd,
config: Config,
) -> Result<Self, Error>
pub fn new_1ch( pwm: impl Peripheral<P = T> + 'd, ch0: impl Peripheral<P = impl GpioPin> + 'd, config: Config, ) -> Result<Self, Error>
Create a new 1-channel PWM
Sourcepub fn new_2ch(
pwm: impl Peripheral<P = T> + 'd,
ch0: impl Peripheral<P = impl GpioPin> + 'd,
ch1: impl Peripheral<P = impl GpioPin> + 'd,
config: Config,
) -> Result<Self, Error>
pub fn new_2ch( pwm: impl Peripheral<P = T> + 'd, ch0: impl Peripheral<P = impl GpioPin> + 'd, ch1: impl Peripheral<P = impl GpioPin> + 'd, config: Config, ) -> Result<Self, Error>
Create a new 2-channel PWM
Sourcepub fn new_3ch(
pwm: impl Peripheral<P = T> + 'd,
ch0: impl Peripheral<P = impl GpioPin> + 'd,
ch1: impl Peripheral<P = impl GpioPin> + 'd,
ch2: impl Peripheral<P = impl GpioPin> + 'd,
config: Config,
) -> Result<Self, Error>
pub fn new_3ch( pwm: impl Peripheral<P = T> + 'd, ch0: impl Peripheral<P = impl GpioPin> + 'd, ch1: impl Peripheral<P = impl GpioPin> + 'd, ch2: impl Peripheral<P = impl GpioPin> + 'd, config: Config, ) -> Result<Self, Error>
Create a new 3-channel PWM
Sourcepub fn new_4ch(
pwm: impl Peripheral<P = T> + 'd,
ch0: impl Peripheral<P = impl GpioPin> + 'd,
ch1: impl Peripheral<P = impl GpioPin> + 'd,
ch2: impl Peripheral<P = impl GpioPin> + 'd,
ch3: impl Peripheral<P = impl GpioPin> + 'd,
config: Config,
) -> Result<Self, Error>
pub fn new_4ch( pwm: impl Peripheral<P = T> + 'd, ch0: impl Peripheral<P = impl GpioPin> + 'd, ch1: impl Peripheral<P = impl GpioPin> + 'd, ch2: impl Peripheral<P = impl GpioPin> + 'd, ch3: impl Peripheral<P = impl GpioPin> + 'd, config: Config, ) -> Result<Self, Error>
Create a new 4-channel PWM
Sourcepub fn event_stopped(&self) -> Event<'d>
pub fn event_stopped(&self) -> Event<'d>
Returns reference to Stopped
event endpoint for PPI.
Sourcepub fn event_loops_done(&self) -> Event<'d>
pub fn event_loops_done(&self) -> Event<'d>
Returns reference to LoopsDone
event endpoint for PPI.
Sourcepub fn event_pwm_period_end(&self) -> Event<'d>
pub fn event_pwm_period_end(&self) -> Event<'d>
Returns reference to PwmPeriodEnd
event endpoint for PPI.
Sourcepub fn event_seq_end(&self) -> Event<'d>
pub fn event_seq_end(&self) -> Event<'d>
Returns reference to Seq0 End
event endpoint for PPI.
Sourcepub fn event_seq1_end(&self) -> Event<'d>
pub fn event_seq1_end(&self) -> Event<'d>
Returns reference to Seq1 End
event endpoint for PPI.
Sourcepub fn event_seq0_started(&self) -> Event<'d>
pub fn event_seq0_started(&self) -> Event<'d>
Returns reference to Seq0 Started
event endpoint for PPI.
Sourcepub fn event_seq1_started(&self) -> Event<'d>
pub fn event_seq1_started(&self) -> Event<'d>
Returns reference to Seq1 Started
event endpoint for PPI.
Sourcepub unsafe fn task_start_seq0(&self) -> Task<'d>
pub unsafe fn task_start_seq0(&self) -> Task<'d>
Returns reference to Seq0 Start
task endpoint for PPI.
§Safety
Interacting with the sequence while it runs puts it in an unknown state
Sourcepub unsafe fn task_start_seq1(&self) -> Task<'d>
pub unsafe fn task_start_seq1(&self) -> Task<'d>
Returns reference to Seq1 Started
task endpoint for PPI.
§Safety
Interacting with the sequence while it runs puts it in an unknown state
Sourcepub unsafe fn task_next_step(&self) -> Task<'d>
pub unsafe fn task_next_step(&self) -> Task<'d>
Returns reference to NextStep
task endpoint for PPI.
§Safety
Interacting with the sequence while it runs puts it in an unknown state