pub struct Timer<MODE> { /* private fields */ }Expand description
HAL struct for Timer1 (timer type A)
Implementations§
Source§impl<MODE> Timer<MODE>
impl<MODE> Timer<MODE>
Sourcepub fn timer1_synchronous(
timer: TMR1,
clocking: Clocking,
prescale: ClockPrescale,
period: u16,
stop_in_idle_mode: bool,
) -> Timer<TimerSynchronous>
pub fn timer1_synchronous( timer: TMR1, clocking: Clocking, prescale: ClockPrescale, period: u16, stop_in_idle_mode: bool, ) -> Timer<TimerSynchronous>
Initalize the timer for synchronous operation
The timer peripheral is running synchronously with the PBCLOCK and cannot count external pulses when the PBCLOCK is gated.
Sourcepub fn timer1_asynchronous(
timer: TMR1,
prescale: ClockPrescale,
period: u16,
stop_in_idle_mode: bool,
) -> Timer<TimerAsynchronous>
pub fn timer1_asynchronous( timer: TMR1, prescale: ClockPrescale, period: u16, stop_in_idle_mode: bool, ) -> Timer<TimerAsynchronous>
Initialize the timer for asynchronous operation
The timer will operate asynchronously with respect and independently from to the PBCLOCK When operating asynchronously, the timer is always external clocked, e.g. by a 32 kHz clock source or the like.
Sourcepub fn set_period(&mut self, period: u16)
pub fn set_period(&mut self, period: u16)
Write to the period (PR register)
Source§impl Timer<TimerSynchronous>
impl Timer<TimerSynchronous>
Auto Trait Implementations§
impl<MODE> Freeze for Timer<MODE>
impl<MODE> RefUnwindSafe for Timer<MODE>where
MODE: RefUnwindSafe,
impl<MODE> Send for Timer<MODE>where
MODE: Send,
impl<MODE> !Sync for Timer<MODE>
impl<MODE> Unpin for Timer<MODE>where
MODE: Unpin,
impl<MODE> UnwindSafe for Timer<MODE>where
MODE: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more