Trait esp_hal::ledc::timer::TimerIFace
source · pub trait TimerIFace<S: TimerSpeed> {
// Required methods
fn get_freq(&self) -> Option<HertzU32>;
fn configure(
&mut self,
config: Config<S::ClockSourceType>
) -> Result<(), Error>;
fn is_configured(&self) -> bool;
fn get_duty(&self) -> Option<Duty>;
fn get_number(&self) -> Number;
fn get_frequency(&self) -> u32;
}Expand description
Interface for Timers
Required Methods§
sourcefn configure(&mut self, config: Config<S::ClockSourceType>) -> Result<(), Error>
fn configure(&mut self, config: Config<S::ClockSourceType>) -> Result<(), Error>
Configure the timer
sourcefn is_configured(&self) -> bool
fn is_configured(&self) -> bool
Check if the timer has been configured
sourcefn get_number(&self) -> Number
fn get_number(&self) -> Number
Return the timer number
sourcefn get_frequency(&self) -> u32
fn get_frequency(&self) -> u32
Return the timer frequency, or 0 if not configured