Trait esp32c2_hal::ledc::channel::ChannelIFace
source · pub trait ChannelIFace<'a, S, O>where
S: TimerSpeed + 'a,
O: OutputPin + 'a,
Channel<'a, S, O>: ChannelHW<O>,{
// Required methods
fn configure(&mut self, config: Config<'a, S>) -> Result<(), Error>;
fn set_duty(&self, duty_pct: u8) -> Result<(), Error>;
fn start_duty_fade(
&self,
start_duty_pct: u8,
end_duty_pct: u8,
duration_ms: u16
) -> Result<(), Error>;
fn is_duty_fade_running(&self) -> bool;
}
Expand description
Channel interface
Required Methods§
sourcefn start_duty_fade(
&self,
start_duty_pct: u8,
end_duty_pct: u8,
duration_ms: u16
) -> Result<(), Error>
fn start_duty_fade( &self, start_duty_pct: u8, end_duty_pct: u8, duration_ms: u16 ) -> Result<(), Error>
Start a duty-cycle fade
sourcefn is_duty_fade_running(&self) -> bool
fn is_duty_fade_running(&self) -> bool
Check whether a duty-cycle fade is running