pub struct Ctimer { /* private fields */ }Expand description
Standard counter/timers (CTIMER0 to 4)
Implementations§
Source§impl Ctimer
impl Ctimer
pub const unsafe fn from_ptr(ptr: *mut ()) -> Self
pub const fn as_ptr(&self) -> *mut ()
Sourcepub const fn ir(self) -> Reg<Ir, RW>
pub const fn ir(self) -> Reg<Ir, RW>
Interrupt Register. The IR can be written to clear interrupts. The IR can be read to identify which of eight possible interrupt sources are pending.
Sourcepub const fn tcr(self) -> Reg<Tcr, RW>
pub const fn tcr(self) -> Reg<Tcr, RW>
Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR.
Sourcepub const fn mr(self, n: usize) -> Reg<Mr, RW>
pub const fn mr(self, n: usize) -> Reg<Mr, RW>
Match Register . MR can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR matches the TC.
Sourcepub const fn ccr(self) -> Reg<Ccr, RW>
pub const fn ccr(self) -> Reg<Ccr, RW>
Capture Control Register. The CCR controls which edges of the capture inputs are used to load the Capture Registers and whether or not an interrupt is generated when a capture takes place.
Sourcepub const fn cr(self, n: usize) -> Reg<Cr, R>
pub const fn cr(self, n: usize) -> Reg<Cr, R>
Capture Register . CR is loaded with the value of TC when there is an event on the CAPn. input.
Sourcepub const fn emr(self) -> Reg<Emr, RW>
pub const fn emr(self) -> Reg<Emr, RW>
External Match Register. The EMR controls the match function and the external match pins.
Sourcepub const fn ctcr(self) -> Reg<Ctcr, RW>
pub const fn ctcr(self) -> Reg<Ctcr, RW>
Count Control Register. The CTCR selects between Timer and Counter mode, and in Counter mode selects the signal and edge(s) for counting.