[−][src]Struct alt_stm32f30x_hal::timer::tim4::Timer
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]
T: Into<Hertz<u32>>,
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]
T: Into<Hertz<u32>>,
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]
self
) -> ((Channel<CH1, Inactive>, Channel<CH2, Inactive>, Channel<CH3, Inactive>, Channel<CH4, Inactive>), Timer<PwmTaken>)
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]
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,
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
fn start<T>(&mut self, timeout: T) where
T: Into<Hertz<u32>>,
[src]
T: Into<Hertz<u32>>,
fn wait(&mut self) -> Result<(), Void>
[src]
impl<PS: PwmState> Periodic for Timer<PS>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self