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<Self, 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.