Struct esp_idf_svc::hal::ledc::LedcTimerDriver
source · pub struct LedcTimerDriver<'d> { /* private fields */ }
Expand description
LED Control timer driver
Implementations§
source§impl<'d> LedcTimerDriver<'d>
impl<'d> LedcTimerDriver<'d>
pub fn new<T>(
_timer: impl Peripheral<P = T> + 'd,
config: &TimerConfig
) -> Result<LedcTimerDriver<'d>, EspError>where
T: LedcTimer,
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.