Struct stm32f4xx_hal::pac::TIM2
source · pub struct TIM2 { /* private fields */ }
Expand description
General purpose timers
Implementations§
Methods from Deref<Target = RegisterBlock>§
sourcepub fn ccmr1_input(&self) -> &Reg<CCMR1_INPUT_SPEC>
pub fn ccmr1_input(&self) -> &Reg<CCMR1_INPUT_SPEC>
0x18 - capture/compare mode register 1 (input mode)
sourcepub fn ccmr1_output(&self) -> &Reg<CCMR1_OUTPUT_SPEC>
pub fn ccmr1_output(&self) -> &Reg<CCMR1_OUTPUT_SPEC>
0x18 - capture/compare mode register 1 (output mode)
sourcepub fn ccmr2_input(&self) -> &Reg<CCMR2_INPUT_SPEC>
pub fn ccmr2_input(&self) -> &Reg<CCMR2_INPUT_SPEC>
0x1c - capture/compare mode register 2 (input mode)
sourcepub fn ccmr2_output(&self) -> &Reg<CCMR2_OUTPUT_SPEC>
pub fn ccmr2_output(&self) -> &Reg<CCMR2_OUTPUT_SPEC>
0x1c - capture/compare mode register 2 (output mode)
Trait Implementations§
source§impl Enable for TIM2
impl Enable for TIM2
source§fn is_enabled() -> bool
fn is_enabled() -> bool
Check if peripheral enabled
source§fn is_disabled() -> bool
fn is_disabled() -> bool
Check if peripheral disabled
source§unsafe fn enable_unchecked()
unsafe fn enable_unchecked()
Safety Read more
source§unsafe fn disable_unchecked()
unsafe fn disable_unchecked()
Safety Read more
source§impl LPEnable for TIM2
impl LPEnable for TIM2
source§fn enable_in_low_power(rcc: &RccRB)
fn enable_in_low_power(rcc: &RccRB)
Enables peripheral in low power mode
source§fn disable_in_low_power(rcc: &RccRB)
fn disable_in_low_power(rcc: &RccRB)
Disables peripheral in low power mode
source§fn is_enabled_in_low_power() -> bool
fn is_enabled_in_low_power() -> bool
Check if peripheral enabled in low power mode
source§fn is_disabled_in_low_power() -> bool
fn is_disabled_in_low_power() -> bool
Check if peripheral disabled in low power mode
source§unsafe fn enable_in_low_power_unchecked()
unsafe fn enable_in_low_power_unchecked()
Safety Read more
source§unsafe fn disable_in_low_power_unchecked()
unsafe fn disable_in_low_power_unchecked()
Safety Read more
impl Instance for TIM2
impl Send for TIM2
Auto Trait Implementations§
impl Freeze for TIM2
impl RefUnwindSafe for TIM2
impl !Sync for TIM2
impl Unpin for TIM2
impl UnwindSafe for TIM2
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
source§impl<T> BusTimerClock for T
impl<T> BusTimerClock for T
source§impl<TIM> MonoTimer64Ext for TIMwhere
TIM: Instance + General + WithPwm,
impl<TIM> MonoTimer64Ext for TIMwhere
TIM: Instance + General + WithPwm,
fn monotonic64<const FREQ: u32>(self, clocks: &Clocks) -> MonoTimer64<TIM, FREQ>
fn monotonic64_us(self, clocks: &Clocks) -> MonoTimer64<Self, 1_000_000>
source§impl<TIM> MonoTimerExt for TIM
impl<TIM> MonoTimerExt for TIM
source§impl<TIM> PwmExt for TIMwhere
TIM: Instance + WithPwm,
impl<TIM> PwmExt for TIMwhere
TIM: Instance + WithPwm,
fn pwm<PINS, const FREQ: u32>(
self,
pins: PINS,
time: Duration<u32, 1, FREQ>,
clocks: &Clocks
) -> Pwm<TIM, PINS, FREQ>where
PINS: Pins<TIM>,
fn pwm_hz<PINS>(
self,
pins: PINS,
time: Rate<u32, 1, 1>,
clocks: &Clocks
) -> PwmHz<TIM, PINS>where
PINS: Pins<TIM>,
fn pwm_us<PINS>(
self,
pins: PINS,
time: TimerDurationU32<1_000_000>,
clocks: &Clocks
) -> Pwm<Self, PINS, 1_000_000>where
PINS: Pins<Self>,
source§impl<TIM> TimerExt for TIMwhere
TIM: Instance,
impl<TIM> TimerExt for TIMwhere
TIM: Instance,
source§fn counter<const FREQ: u32>(self, clocks: &Clocks) -> Counter<TIM, FREQ>
fn counter<const FREQ: u32>(self, clocks: &Clocks) -> Counter<TIM, FREQ>
Non-blocking Counter with custom fixed precision
source§fn counter_hz(self, clocks: &Clocks) -> CounterHz<TIM>
fn counter_hz(self, clocks: &Clocks) -> CounterHz<TIM>
Non-blocking Counter with dynamic precision which uses
Hertz
as Duration unitssource§fn delay<const FREQ: u32>(self, clocks: &Clocks) -> Delay<TIM, FREQ>
fn delay<const FREQ: u32>(self, clocks: &Clocks) -> Delay<TIM, FREQ>
Blocking Delay with custom fixed precision