Trait ChannelHW

Source
pub trait ChannelHW {
    // 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;
}
Available on crate feature unstable only.
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>

Configure the hardware for the channel with a specific pin configuration.

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<S> ChannelHW for Channel<'_, S>
where S: TimerSpeed,