TIM2

Type Alias TIM2 

Source
pub type TIM2 = Periph<RegisterBlock, 1073741824>;
Expand description

General purpose timer

See peripheral structure

Aliased Type§

pub struct TIM2 { /* private fields */ }

Trait Implementations§

Source§

impl Enable for TIM2

Source§

fn enable(rcc: &mut RCC)

Enables peripheral
Source§

fn disable(rcc: &mut RCC)

Disables peripheral
Source§

fn is_enabled() -> bool

Check if peripheral enabled
Source§

fn is_disabled() -> bool

Check if peripheral disabled
Source§

unsafe fn enable_unchecked()

Safety Read more
Source§

unsafe fn disable_unchecked()

Safety Read more
Source§

impl GeneralTimer for TIM2

Source§

fn reset_config(&mut self)

Source§

fn enable_counter(&mut self)

Source§

fn disable_counter(&mut self)

Source§

fn is_counter_enabled(&self) -> bool

Source§

fn reset_counter(&mut self)

Source§

fn max_auto_reload() -> u32

Source§

unsafe fn set_auto_reload_unchecked(&mut self, arr: u32)

Safety Read more
Source§

fn set_auto_reload(&mut self, arr: u32) -> Result<(), Error>

Source§

fn read_auto_reload(&self) -> u32

Source§

fn set_prescaler(&mut self, psc: u16)

Source§

fn read_prescaler(&self) -> u16

Source§

fn read_count(&self) -> u32

Source§

fn trigger_update(&mut self)

Source§

fn config_freq(&mut self, clock: Hertz, update_freq: Hertz)

Source§

fn clear_interrupt_flag(&mut self, event: Event)

Source§

fn listen_interrupt(&mut self, event: Event, b: bool)

Source§

fn get_interrupt_flag(&self) -> Event

Source§

fn start_one_pulse(&mut self)

Source§

fn stop_in_debug(&mut self, state: bool)

Source§

fn enable_preload(&mut self, b: bool)

Source§

impl MasterTimer for TIM2

Source§

fn master_mode(&mut self, mode: MasterMode)

Source§

impl RccBus for TIM2

Source§

type Bus = APB1

Bus type;
Source§

impl Remap for TIM2

Source§

type Mapr = MAPR

Source§

fn remap<const R: u8>(self, mapr: &mut Self::Mapr) -> Rmp<Self, R>

Source§

impl Reset for TIM2

Source§

fn reset(rcc: &mut RCC)

Resets peripheral
Source§

unsafe fn reset_unchecked()

Safety Read more
Source§

impl TimC<0> for TIM2

Source§

type In = Ch1In

Input capture channel Read more
Source§

type Out = Ch1Out

Output compare channel Read more
Source§

impl TimC<1> for TIM2

Source§

type In = Ch2In

Input capture channel Read more
Source§

type Out = Ch2Out

Output compare channel Read more
Source§

impl TimC<2> for TIM2

Source§

type In = Ch3In

Input capture channel Read more
Source§

type Out = Ch3Out

Output compare channel Read more
Source§

impl TimC<3> for TIM2

Source§

type In = Ch4In

Input capture channel Read more
Source§

type Out = Ch4Out

Output compare channel Read more
Source§

impl TimEtr for TIM2

Source§

impl TimerDirection for TIM2

Source§

impl TimerInit<Periph<RegisterBlock, 1073741824>> for TIM2

Source§

fn constrain(self, mcu: &mut Mcu) -> Timer<TIM2>

Source§

impl TimerWithPwm for TIM2

Source§

fn stop_pwm(&mut self)

Source§

fn start_pwm(&mut self)

Source§

fn preload_output_channel_in_mode(&mut self, channel: Channel, mode: PwmMode)

Source§

fn set_polarity(&mut self, channel: Channel, polarity: PwmPolarity)

Source§

impl TimerWithPwm1Ch for TIM2

Source§

fn enable_ch1(&mut self, en: bool)

Source§

fn set_ch1_cc_value(&mut self, value: u32)

Source§

fn get_ch1_cc_value(&self) -> u32

Source§

impl TimerWithPwm2Ch for TIM2

Source§

fn enable_ch2(&mut self, en: bool)

Source§

fn set_ch2_cc_value(&mut self, value: u32)

Source§

fn get_ch2_cc_value(&self) -> u32

Source§

impl TimerWithPwm3Ch for TIM2

Source§

fn enable_ch3(&mut self, en: bool)

Source§

fn set_ch3_cc_value(&mut self, value: u32)

Source§

fn get_ch3_cc_value(&self) -> u32

Source§

impl TimerWithPwm4Ch for TIM2

Source§

fn enable_ch4(&mut self, en: bool)

Source§

fn set_ch4_cc_value(&mut self, value: u32)

Source§

fn get_ch4_cc_value(&self) -> u32

Source§

impl Instance for TIM2