[][src]Struct alt_stm32f30x_hal::timer::tim4::Timer

pub struct Timer<PS: PwmState> { /* fields omitted */ }

Timer impl

Methods

impl Timer<PwmFree>[src]

pub fn new<T>(tim: TIM4, timeout: T, clocks: Clocks) -> Timer<PwmFree> where
    T: Into<Hertz<u32>>, 
[src]

Creates new timer

pub fn free(self, apb: &mut APB1) -> TIM4[src]

Releases the TIM peripheral

impl<PS: PwmState> Timer<PS>[src]

pub fn reset<T>(&mut self, timeout: T) where
    T: Into<Hertz<u32>>, 
[src]

Stop timer and reset frequency (doesn't start/enable)

pub fn listen(&mut self, event: Event)[src]

Starts listening for an event

pub fn unlisten(&mut self, event: Event)[src]

Stops listening for an event

pub fn enable(&mut self)[src]

Enable timer

impl Timer<PwmFree>[src]

pub fn use_pwm(
    self
) -> ((Channel<CH1, Inactive>, Channel<CH2, Inactive>, Channel<CH3, Inactive>, Channel<CH4, Inactive>), Timer<PwmTaken>)
[src]

Consumes timer and returns pwm channels and timer without them.

impl Timer<PwmTaken>[src]

pub fn return_pwm<M1, M2, M3, M4>(
    self,
    _channels: (Channel<CH1, M1>, Channel<CH2, M2>, Channel<CH3, M3>, Channel<CH4, M4>)
) -> Timer<PwmFree> where
    M1: ChMode,
    M2: ChMode,
    M3: ChMode,
    M4: ChMode
[src]

Returns pwm channels back.

Trait Implementations

impl<PS: PwmState> CountDown for Timer<PS>[src]

type Time = Hertz<u32>

The unit of time used by this timer

impl<PS: PwmState> Periodic for Timer<PS>[src]

Auto Trait Implementations

impl<PS> Send for Timer<PS> where
    PS: Send

impl<PS> !Sync for Timer<PS>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self