Struct stm32f1xx_hal::pac::TIM2
source · pub struct TIM2 { /* private fields */ }
Expand description
General purpose timer
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
fn enable(rcc: &RegisterBlock)
fn disable(rcc: &RegisterBlock)
source§impl MonoTimerExt for TIM2
impl MonoTimerExt for TIM2
impl Instance for TIM2
impl Send for TIM2
Auto Trait Implementations§
Blanket Implementations§
source§impl<TIM> PwmExt for TIMwhere
TIM: Instance + WithPwm,
impl<TIM> PwmExt for TIMwhere
TIM: Instance + WithPwm,
fn pwm<REMAP, P, PINS, const FREQ: u32>(
self,
pins: PINS,
mapr: &mut MAPR,
time: Duration<u32, 1, FREQ>,
clocks: &Clocks
) -> Pwm<TIM, REMAP, P, PINS, FREQ>where
REMAP: Remap<Periph = TIM>,
PINS: Pins<REMAP, P>,
fn pwm_hz<REMAP, P, PINS>(
self,
pins: PINS,
mapr: &mut MAPR,
time: Rate<u32, 1, 1>,
clocks: &Clocks
) -> PwmHz<TIM, REMAP, P, PINS>where
REMAP: Remap<Periph = TIM>,
PINS: Pins<REMAP, P>,
fn pwm_us<REMAP, P, PINS>(
self,
pins: PINS,
mapr: &mut MAPR,
time: TimerDurationU32<1_000_000>,
clocks: &Clocks
) -> Pwm<Self, REMAP, P, PINS, 1_000_000>where
REMAP: Remap<Periph = Self>,
PINS: Pins<REMAP, P>,
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