Trait esp32c2_hal::ledc::channel::ChannelHW
source · 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§
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
.
fn configure_hw_with_pin_config(&mut self, cfg: PinConfig) -> Result<(), Error>
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