Struct esp32s2::TIMG1

source ·
pub struct TIMG1 { /* private fields */ }
Expand description

Timer Group 1

Implementations§

source§

impl TIMG1

source

pub const PTR: *const RegisterBlock = {0x3f420000 as *const timg0::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 tconfig(&self, n: usize) -> &TCONFIG

0x00..0x08 - Timer %s configuration register

source

pub fn tconfig_iter(&self) -> impl Iterator<Item = &TCONFIG>

Iterator for array of: 0x00..0x08 - Timer %s configuration register

source

pub fn t0config(&self) -> &TCONFIG

0x00 - Timer 0 configuration register

source

pub fn t1config(&self) -> &TCONFIG

0x24 - Timer 1 configuration register

source

pub fn tlo(&self, n: usize) -> &TLO

0x04..0x0c - Timer %s current value, low 32 bits

source

pub fn tlo_iter(&self) -> impl Iterator<Item = &TLO>

Iterator for array of: 0x04..0x0c - Timer %s current value, low 32 bits

source

pub fn t0lo(&self) -> &TLO

0x04 - Timer 0 current value, low 32 bits

source

pub fn t1lo(&self) -> &TLO

0x28 - Timer 1 current value, low 32 bits

source

pub fn thi(&self, n: usize) -> &THI

0x08..0x10 - Timer %s current value, high 32 bits

source

pub fn thi_iter(&self) -> impl Iterator<Item = &THI>

Iterator for array of: 0x08..0x10 - Timer %s current value, high 32 bits

source

pub fn t0hi(&self) -> &THI

0x08 - Timer 0 current value, high 32 bits

source

pub fn t1hi(&self) -> &THI

0x2c - Timer 1 current value, high 32 bits

source

pub fn tupdate(&self, n: usize) -> &TUPDATE

0x0c..0x14 - Write to copy current timer value to TIMG_T%sLO_REG or TIMGn_T%sHI_REG

source

pub fn tupdate_iter(&self) -> impl Iterator<Item = &TUPDATE>

Iterator for array of: 0x0c..0x14 - Write to copy current timer value to TIMG_T%sLO_REG or TIMGn_T%sHI_REG

source

pub fn t0update(&self) -> &TUPDATE

0x0c - Write to copy current timer value to TIMG_T0LO_REG or TIMGn_T0HI_REG

source

pub fn t1update(&self) -> &TUPDATE

0x30 - Write to copy current timer value to TIMG_T1LO_REG or TIMGn_T1HI_REG

source

pub fn talarmlo(&self, n: usize) -> &TALARMLO

0x10..0x18 - Timer %s alarm value, low 32 bits

source

pub fn talarmlo_iter(&self) -> impl Iterator<Item = &TALARMLO>

Iterator for array of: 0x10..0x18 - Timer %s alarm value, low 32 bits

source

pub fn t0alarmlo(&self) -> &TALARMLO

0x10 - Timer 0 alarm value, low 32 bits

source

pub fn t1alarmlo(&self) -> &TALARMLO

0x34 - Timer 1 alarm value, low 32 bits

source

pub fn talarmhi(&self, n: usize) -> &TALARMHI

0x14..0x1c - Timer %s alarm value, high bits

source

pub fn talarmhi_iter(&self) -> impl Iterator<Item = &TALARMHI>

Iterator for array of: 0x14..0x1c - Timer %s alarm value, high bits

source

pub fn t0alarmhi(&self) -> &TALARMHI

0x14 - Timer 0 alarm value, high bits

source

pub fn t1alarmhi(&self) -> &TALARMHI

0x38 - Timer 1 alarm value, high bits

source

pub fn tloadlo(&self, n: usize) -> &TLOADLO

0x18..0x20 - Timer %s reload value, low 32 bits

source

pub fn tloadlo_iter(&self) -> impl Iterator<Item = &TLOADLO>

Iterator for array of: 0x18..0x20 - Timer %s reload value, low 32 bits

source

pub fn t0loadlo(&self) -> &TLOADLO

0x18 - Timer 0 reload value, low 32 bits

source

pub fn t1loadlo(&self) -> &TLOADLO

0x3c - Timer 1 reload value, low 32 bits

source

pub fn tloadhi(&self, n: usize) -> &TLOADHI

0x1c..0x24 - Timer %s reload value, high 32 bits

source

pub fn tloadhi_iter(&self) -> impl Iterator<Item = &TLOADHI>

Iterator for array of: 0x1c..0x24 - Timer %s reload value, high 32 bits

source

pub fn t0loadhi(&self) -> &TLOADHI

0x1c - Timer 0 reload value, high 32 bits

source

pub fn t1loadhi(&self) -> &TLOADHI

0x40 - Timer 1 reload value, high 32 bits

source

pub fn tload(&self, n: usize) -> &TLOAD

0x20..0x28 - Write to reload timer from TIMG_T%sLOADLO_REG or TIMG_T%sLOADHI_REG

source

pub fn tload_iter(&self) -> impl Iterator<Item = &TLOAD>

Iterator for array of: 0x20..0x28 - Write to reload timer from TIMG_T%sLOADLO_REG or TIMG_T%sLOADHI_REG

source

pub fn t0load(&self) -> &TLOAD

0x20 - Write to reload timer from TIMG_T0LOADLO_REG or TIMG_T0LOADHI_REG

source

pub fn t1load(&self) -> &TLOAD

0x44 - Write to reload timer from TIMG_T1LOADLO_REG or TIMG_T1LOADHI_REG

source

pub fn wdtconfig0(&self) -> &WDTCONFIG0

0x48 - Watchdog timer configuration register

source

pub fn wdtconfig1(&self) -> &WDTCONFIG1

0x4c - Watchdog timer prescaler register

source

pub fn wdtconfig2(&self) -> &WDTCONFIG2

0x50 - Watchdog timer stage 0 timeout value

source

pub fn wdtconfig3(&self) -> &WDTCONFIG3

0x54 - Watchdog timer stage 1 timeout value

source

pub fn wdtconfig4(&self) -> &WDTCONFIG4

0x58 - Watchdog timer stage 2 timeout value

source

pub fn wdtconfig5(&self) -> &WDTCONFIG5

0x5c - Watchdog timer stage 3 timeout value

source

pub fn wdtfeed(&self) -> &WDTFEED

0x60 - Write to feed the watchdog timer

source

pub fn wdtwprotect(&self) -> &WDTWPROTECT

0x64 - Watchdog write protect register

source

pub fn rtccalicfg(&self) -> &RTCCALICFG

0x68 - RTC calibration configuration register

source

pub fn rtccalicfg1(&self) -> &RTCCALICFG1

0x6c - RTC calibration configuration register 1

source

pub fn lactconfig(&self) -> &LACTCONFIG

0x70 - LACT configuration register

source

pub fn lactrtc(&self) -> &LACTRTC

0x74 - LACT RTC register

source

pub fn lactlo(&self) -> &LACTLO

0x78 - LACT low register

source

pub fn lacthi(&self) -> &LACTHI

0x7c - LACT high register

source

pub fn lactupdate(&self) -> &LACTUPDATE

0x80 - LACT update register

source

pub fn lactalarmlo(&self) -> &LACTALARMLO

0x84 - LACT alarm low register

source

pub fn lactalarmhi(&self) -> &LACTALARMHI

0x88 - LACT alarm high register

source

pub fn lactloadlo(&self) -> &LACTLOADLO

0x8c - LACT load low register

source

pub fn lactloadhi(&self) -> &LACTLOADHI

0x90 - Timer LACT load high register

source

pub fn lactload(&self) -> &LACTLOAD

0x94 - Timer LACT load register

source

pub fn int_ena_timers(&self) -> &INT_ENA_TIMERS

0x98 - Interrupt enable bits

source

pub fn int_raw_timers(&self) -> &INT_RAW_TIMERS

0x9c - Raw interrupt status

source

pub fn int_st_timers(&self) -> &INT_ST_TIMERS

0xa0 - Masked interrupt status

source

pub fn int_clr_timers(&self) -> &INT_CLR_TIMERS

0xa4 - Interrupt clear bits

source

pub fn rtccalicfg2(&self) -> &RTCCALICFG2

0xa8 - Timer group calibration register

source

pub fn timers_date(&self) -> &TIMERS_DATE

0xf8 - Version control register

source

pub fn regclk(&self) -> &REGCLK

0xfc - Timer group clock gate register

Trait Implementations§

source§

impl Debug for TIMG1

source§

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

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

impl Deref for TIMG1

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl Send for TIMG1

Auto Trait Implementations§

§

impl RefUnwindSafe for TIMG1

§

impl !Sync for TIMG1

§

impl Unpin for TIMG1

§

impl UnwindSafe for TIMG1

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<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.