TIMER

Struct TIMER 

Source
pub struct TIMER { /* private fields */ }
Expand description

Timer Module, includes timer0, timer1, watchdog and audio video synchronization

Implementations§

Source§

impl TIMER

Source

pub const PTR: *const RegisterBlock = {0x2050000 as *const timer::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

Source

pub fn tmr_irq_en(&self) -> &TMR_IRQ_EN

0x00 - Timer IRQ Enable Register

Source

pub fn tmr_irq_sta(&self) -> &TMR_IRQ_STA

0x04 - Timer Status Register

Source

pub fn tmr_ctrl(&self, n: usize) -> &TMR_CTRL

0x10..0x18 - Timer IRQ Enable Register

Source

pub fn tmr0_ctrl(&self) -> &TMR_CTRL

0x10 - Timer IRQ Enable Register

Source

pub fn tmr1_ctrl(&self) -> &TMR_CTRL

0x20 - Timer IRQ Enable Register

Source

pub fn tmr_intv_value(&self, n: usize) -> &TMR_INTV_VALUE

0x14..0x1c - Timer Interval Value Register

Source

pub fn tmr0_intv_value(&self) -> &TMR_INTV_VALUE

0x14 - Timer Interval Value Register

Source

pub fn tmr1_intv_value(&self) -> &TMR_INTV_VALUE

0x24 - Timer Interval Value Register

Source

pub fn tmr_cur_value(&self, n: usize) -> &TMR_CUR_VALUE

0x18..0x20 - Timer Current Value Register

Source

pub fn tmr0_cur_value(&self) -> &TMR_CUR_VALUE

0x18 - Timer Current Value Register

Source

pub fn tmr1_cur_value(&self) -> &TMR_CUR_VALUE

0x28 - Timer Current Value Register

Source

pub fn wdog_irq_en(&self) -> &WDOG_IRQ_EN

0xa0 - Watchdog IRQ Enable Register

Source

pub fn wdog_irq_sta(&self) -> &WDOG_IRQ_STA

0xa4 - Watchdog Status Register

Source

pub fn wdog_soft_rst(&self) -> &WDOG_SOFT_RST

0xa8 - Watchdog Software Reset Register

Source

pub fn wdog_ctrl(&self) -> &WDOG_CTRL

0xb0 - Watchdog Control Register

Source

pub fn wdog_cfg(&self) -> &WDOG_CFG

0xb4 - Watchdog Configuration Register

Source

pub fn wdog_mode(&self) -> &WDOG_MODE

0xb8 - Watchdog Mode Register

Source

pub fn wdog_output_cfg(&self) -> &WDOG_OUTPUT_CFG

0xbc - Watchdog Output Configuration Register

Source

pub fn avs_cnt_ctl(&self) -> &AVS_CNT_CTL

0xc0 - AVS Counter Control Register

Source

pub fn avs_cnt0(&self) -> &AVS_CNT0

0xc4 - AVS Counter 0 Register

Source

pub fn avs_cnt1(&self) -> &AVS_CNT1

0xc8 - AVS Counter 1 Register

Source

pub fn avs_cnt_div(&self) -> &AVS_CNT_DIV

0xcc - AVS Counter Divisor Register

Trait Implementations§

Source§

impl Debug for TIMER

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for TIMER

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for TIMER

Auto Trait Implementations§

§

impl Freeze for TIMER

§

impl RefUnwindSafe for TIMER

§

impl !Sync for TIMER

§

impl Unpin for TIMER

§

impl UnwindSafe for TIMER

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.