Struct stm32wlxx_hal::lptim::LpTim1
source · pub struct LpTim1 { /* private fields */ }
Expand description
Low-power timer 1 driver.
Implementations§
source§impl LpTim1
impl LpTim1
sourcepub fn new_trigger_pin<P: LpTim1Etr>(
&mut self,
filter: Filter,
pol: TrgPol,
pin: P,
cs: &CriticalSection
) -> LpTim1Trg<P>
pub fn new_trigger_pin<P: LpTim1Etr>( &mut self, filter: Filter, pol: TrgPol, pin: P, cs: &CriticalSection ) -> LpTim1Trg<P>
sourcepub fn free_trigger_pin<P: LpTim1Etr>(&mut self, pin: LpTim1Trg<P>) -> P
pub fn free_trigger_pin<P: LpTim1Etr>(&mut self, pin: LpTim1Trg<P>) -> P
Free the trigger pin previously created with
new_trigger_pin
.
This is will the trigger source to a software trigger.
Panics
- (debug) timer is enabled.
Example
source§impl LpTim1
impl LpTim1
sourcepub fn new_output_pin<P: LpTim1Out>(
&mut self,
pin: P,
cs: &CriticalSection
) -> LpTim1OutPin<P>
pub fn new_output_pin<P: LpTim1Out>( &mut self, pin: P, cs: &CriticalSection ) -> LpTim1OutPin<P>
Setup a new output pin.
sourcepub fn free_output_pin<P: LpTim1Out>(&mut self, pin: LpTim1OutPin<P>) -> P
pub fn free_output_pin<P: LpTim1Out>(&mut self, pin: LpTim1OutPin<P>) -> P
Free the output pin previously created with
new_output_pin
.
Trait Implementations§
source§impl LpTim for LpTim1
impl LpTim for LpTim1
source§fn new(tim: Self::Pac, clk: Clk, pre: Prescaler, rcc: &mut RCC) -> Self
fn new(tim: Self::Pac, clk: Clk, pre: Prescaler, rcc: &mut RCC) -> Self
Create a new LPTIM driver. Read more
source§unsafe fn pulse_reset(rcc: &mut RCC)
unsafe fn pulse_reset(rcc: &mut RCC)
Reset the LPTIM peripheral. Read more
source§fn enable_clock(rcc: &mut RCC)
fn enable_clock(rcc: &mut RCC)
Enable clocks for the LPTIM peripheral. Read more
source§unsafe fn disable_clock(rcc: &mut RCC)
unsafe fn disable_clock(rcc: &mut RCC)
Disable the LPTIM peripheral clock. Read more
source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns
true
if the timer is enabled.source§fn setup_trigger(&mut self, filter: Filter, pol: TrgPol, sel: Self::TrgSel)
fn setup_trigger(&mut self, filter: Filter, pol: TrgPol, sel: Self::TrgSel)
Setup a non-pin trigger. Read more
source§fn set_max_duty(&mut self, duty: u16)
fn set_max_duty(&mut self, duty: u16)
Set the maximum duty cycle (autoreload value). Read more
Auto Trait Implementations§
impl RefUnwindSafe for LpTim1
impl Send for LpTim1
impl !Sync for LpTim1
impl Unpin for LpTim1
impl UnwindSafe for LpTim1
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more