Struct stm32f4xx_hal::pac::TIM4

source ·
pub struct TIM4 { /* private fields */ }
Expand description

General purpose timers

Implementations§

source§

impl TIM4

source

pub const PTR: *const RegisterBlock = {0x40000800 as *const stm32f4::stm32f429::tim3::RegisterBlock}

Pointer to the register block

source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

source

pub fn ccr1(&self) -> &Reg<CCR_SPEC>

0x34 - capture/compare register

source

pub fn ccr2(&self) -> &Reg<CCR_SPEC>

0x38 - capture/compare register

source

pub fn ccr3(&self) -> &Reg<CCR_SPEC>

0x3c - capture/compare register

source

pub fn ccr4(&self) -> &Reg<CCR_SPEC>

0x40 - capture/compare register

source

pub fn ccmr1_input(&self) -> &Reg<CCMR1_INPUT_SPEC>

0x18 - capture/compare mode register 1 (input mode)

source

pub fn ccmr1_output(&self) -> &Reg<CCMR1_OUTPUT_SPEC>

0x18 - capture/compare mode register 1 (output mode)

source

pub fn ccmr2_input(&self) -> &Reg<CCMR2_INPUT_SPEC>

0x1c - capture/compare mode register 2 (input mode)

source

pub fn ccmr2_output(&self) -> &Reg<CCMR2_OUTPUT_SPEC>

0x1c - capture/compare mode register 2 (output mode)

Trait Implementations§

source§

impl Debug for TIM4

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Deref for TIM4

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

fn deref(&self) -> &<TIM4 as Deref>::Target

Dereferences the value.
source§

impl Enable for TIM4

source§

fn enable(rcc: &RccRB)

Enables peripheral
source§

fn disable(rcc: &RccRB)

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 Instance for TIM4

source§

impl LPEnable for TIM4

source§

fn enable_in_low_power(rcc: &RccRB)

Enables peripheral in low power mode
source§

fn disable_in_low_power(rcc: &RccRB)

Disables peripheral in low power mode
source§

fn is_enabled_in_low_power() -> bool

Check if peripheral enabled in low power mode
source§

fn is_disabled_in_low_power() -> bool

Check if peripheral disabled in low power mode
source§

unsafe fn enable_in_low_power_unchecked()

Safety Read more
source§

unsafe fn disable_in_low_power_unchecked()

Safety Read more
source§

impl RccBus for TIM4

§

type Bus = APB1

Bus type;
source§

impl Reset for TIM4

source§

fn reset(rcc: &RccRB)

Resets peripheral
source§

unsafe fn reset_unchecked()

Safety Read more
source§

impl TimCPin<0> for TIM4

§

type Ch<Otype> = Ch1<Otype>

source§

impl TimCPin<1> for TIM4

§

type Ch<Otype> = Ch2<Otype>

source§

impl TimCPin<2> for TIM4

§

type Ch<Otype> = Ch3<Otype>

source§

impl TimCPin<3> for TIM4

§

type Ch<Otype> = Ch4<Otype>

source§

impl TimEtr for TIM4

§

type Etr = Etr

source§

impl Instance for TIM4

source§

impl Send for TIM4

Auto Trait Implementations§

§

impl Freeze for TIM4

§

impl RefUnwindSafe for TIM4

§

impl !Sync for TIM4

§

impl Unpin for TIM4

§

impl UnwindSafe for TIM4

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> BusClock for T
where T: RccBus, <T as RccBus>::Bus: BusClock,

source§

fn clock(clocks: &Clocks) -> Rate<u32, 1, 1>

Calculates frequency depending on Clock state
source§

impl<T> BusTimerClock for T
where T: RccBus, <T as RccBus>::Bus: BusTimerClock,

source§

fn timer_clock(clocks: &Clocks) -> Rate<u32, 1, 1>

Calculates base frequency of timer depending on Clock state
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<TIM> MonoTimer64Ext for TIM
where TIM: Instance + General + WithPwm,

source§

fn monotonic64<const FREQ: u32>(self, clocks: &Clocks) -> MonoTimer64<TIM, FREQ>

source§

fn monotonic64_us(self, clocks: &Clocks) -> MonoTimer64<Self, 1_000_000>

source§

impl<TIM> PwmExt for TIM
where TIM: Instance + WithPwm,

source§

fn pwm<PINS, const FREQ: u32>( self, pins: PINS, time: Duration<u32, 1, FREQ>, clocks: &Clocks ) -> Pwm<TIM, PINS, FREQ>
where PINS: Pins<TIM>,

source§

fn pwm_hz<PINS>( self, pins: PINS, time: Rate<u32, 1, 1>, clocks: &Clocks ) -> PwmHz<TIM, PINS>
where PINS: Pins<TIM>,

source§

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> QeiExt for TIM
where TIM: Instance,

source§

fn qei( self, pins: (impl Into<<TIM as TimCPin<0>>::Ch<PushPull>>, impl Into<<TIM as TimCPin<1>>::Ch<PushPull>>) ) -> Qei<TIM>

source§

impl<TIM> TimerExt for TIM
where TIM: Instance,

source§

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>

Non-blocking Counter with dynamic precision which uses Hertz as Duration units
source§

fn delay<const FREQ: u32>(self, clocks: &Clocks) -> Delay<TIM, FREQ>

Blocking Delay with custom fixed precision
source§

fn counter_ms(self, clocks: &Clocks) -> CounterMs<Self>

Non-blocking Counter with fixed precision of 1 ms (1 kHz sampling) Read more
source§

fn counter_us(self, clocks: &Clocks) -> CounterUs<Self>

Non-blocking Counter with fixed precision of 1 μs (1 MHz sampling) Read more
source§

fn delay_ms(self, clocks: &Clocks) -> DelayMs<Self>

Blocking Delay with fixed precision of 1 ms (1 kHz sampling) Read more
source§

fn delay_us(self, clocks: &Clocks) -> DelayUs<Self>

Blocking Delay with fixed precision of 1 μs (1 MHz sampling) Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.