Skip to main content

R

Type Alias R 

Source
pub type R = R<TimerControlSpec>;
Expand description

Register TIMER%s_CONTROL reader

Aliased Type§

pub struct R { /* private fields */ }

Implementations§

Source§

impl R

Source

pub fn enable(&self) -> EnableR

Bit 0 - Timer enable: 0=disabled; 1=enabled

Source

pub fn mode(&self) -> ModeR

Bits 1:2 - Timer mode (TIMER_V150, per vendor control_reg_mode_v150_t): 0=one-shot; 1=periodic; 3=free-run (2 is a one-shot alias)

Source

pub fn int_mask(&self) -> IntMaskR

Bit 3 - Interrupt mask: 0=unmasked; 1=masked

Source

pub fn cnt_req(&self) -> CntReqR

Bit 5 - Current-count latch request (TIMER_V150): write 1 to snapshot the live down-counter into the current-value register; the HW asserts cnt_lock when the snapshot is ready. Required to read a fresh count on silicon (the current-value register is a latch, not a live counter).

Source

pub fn cnt_lock(&self) -> CntLockR

Bit 6 - Current-count latch valid (TIMER_V150): set by HW after a cnt_req snapshot completes; poll until 1 before reading the current-value register.