Struct esp32c2_hal::ledc::LEDC
source · pub struct LEDC<'d> { /* private fields */ }
Expand description
LEDC (LED PWM Controller)
Implementations§
source§impl<'d> LEDC<'d>
impl<'d> LEDC<'d>
sourcepub fn new(
_instance: impl Peripheral<P = LEDC> + 'd,
clock_control_config: &'d Clocks<'_>,
system: &mut PeripheralClockControl
) -> LEDC<'d>
pub fn new( _instance: impl Peripheral<P = LEDC> + 'd, clock_control_config: &'d Clocks<'_>, system: &mut PeripheralClockControl ) -> LEDC<'d>
Return a new LEDC
sourcepub fn set_global_slow_clock(&mut self, clock_source: LSGlobalClkSource)
pub fn set_global_slow_clock(&mut self, clock_source: LSGlobalClkSource)
Set global slow clock source
sourcepub fn get_timer<S>(&self, number: Number) -> Timer<'_, S>where
S: TimerSpeed,
pub fn get_timer<S>(&self, number: Number) -> Timer<'_, S>where S: TimerSpeed,
Return a new timer
sourcepub fn get_channel<S, O>(
&self,
number: Number,
output_pin: impl Peripheral<P = O> + 'd
) -> Channel<'_, S, O>where
S: TimerSpeed,
O: OutputPin,
pub fn get_channel<S, O>( &self, number: Number, output_pin: impl Peripheral<P = O> + 'd ) -> Channel<'_, S, O>where S: TimerSpeed, O: OutputPin,
Return a new channel