pub trait ChannelHW<O>
where O: OutputPin,
{ // Required methods fn configure_hw(&mut self) -> Result<(), Error>; fn configure_hw_with_pin_config( &mut self, cfg: PinConfig ) -> Result<(), Error>; fn set_duty_hw(&self, duty: u32); fn start_duty_fade_hw( &self, start_duty: u32, duty_inc: bool, duty_steps: u16, cycles_per_step: u16, duty_per_cycle: u16 ); fn is_duty_fade_running_hw(&self) -> bool; }
Expand description

Channel HW interface

Required Methods§

source

fn configure_hw(&mut self) -> Result<(), Error>

Configure Channel HW except for the duty which is set via Self::set_duty_hw.

source

fn configure_hw_with_pin_config(&mut self, cfg: PinConfig) -> Result<(), Error>

source

fn set_duty_hw(&self, duty: u32)

Set channel duty HW

source

fn start_duty_fade_hw( &self, start_duty: u32, duty_inc: bool, duty_steps: u16, cycles_per_step: u16, duty_per_cycle: u16 )

Start a duty-cycle fade HW

source

fn is_duty_fade_running_hw(&self) -> bool

Check whether a duty-cycle fade is running HW

Implementors§

source§

impl<'a, O> ChannelHW<O> for Channel<'a, HighSpeed, O>
where O: OutputPin,

Channel HW interface for HighSpeed channels

source§

impl<'a, O> ChannelHW<O> for Channel<'a, LowSpeed, O>
where O: OutputPin,

Channel HW interface for LowSpeed channels