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§
Sourcefn configure_hw(&mut self) -> Result<(), Error>
fn configure_hw(&mut self) -> Result<(), Error>
Configure Channel HW except for the duty which is set via
Self::set_duty_hw
.
Sourcefn configure_hw_with_pin_config(&mut self, cfg: PinConfig) -> Result<(), Error>
fn configure_hw_with_pin_config(&mut self, cfg: PinConfig) -> Result<(), Error>
Configure the hardware for the channel with a specific pin configuration.
Sourcefn set_duty_hw(&self, duty: u32)
fn set_duty_hw(&self, duty: u32)
Set channel duty HW
Sourcefn start_duty_fade_hw(
&self,
start_duty: u32,
duty_inc: bool,
duty_steps: u16,
cycles_per_step: u16,
duty_per_cycle: u16,
)
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
Sourcefn is_duty_fade_running_hw(&self) -> bool
fn is_duty_fade_running_hw(&self) -> bool
Check whether a duty-cycle fade is running HW