Struct esp_idf_svc::hal::ledc::LedcTimerDriver
source · pub struct LedcTimerDriver<'d, T>where
T: LedcTimer,{ /* private fields */ }
Expand description
LED Control timer driver
Implementations§
source§impl<'d, T> LedcTimerDriver<'d, T>where
T: LedcTimer,
impl<'d, T> LedcTimerDriver<'d, T>where
T: LedcTimer,
pub fn new( timer: impl Peripheral<P = T> + 'd, config: &TimerConfig, ) -> Result<LedcTimerDriver<'d, T>, EspError>
sourcepub fn pause(&mut self) -> Result<(), EspError>
pub fn pause(&mut self) -> Result<(), EspError>
Pauses the timer. Operation can be resumed with [resume_timer()
].
sourcepub fn resume(&mut self) -> Result<(), EspError>
pub fn resume(&mut self) -> Result<(), EspError>
Resumes the operation of the previously paused timer
sourcepub fn set_frequency(&mut self, frequency: Hertz) -> Result<(), EspError>
pub fn set_frequency(&mut self, frequency: Hertz) -> Result<(), EspError>
Set the frequency of the timer.