Struct esp32::PCNT

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

Pulse Count Controller

Implementations§

source§

impl PCNT

source

pub const PTR: *const RegisterBlock = {0x3ff57000 as *const pcnt::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 u_conf0(&self, n: usize) -> &U_CONF0

0x00..0x20 -

source

pub fn u_conf0_iter(&self) -> impl Iterator<Item = &U_CONF0>

Iterator for array of: 0x00..0x20 -

source

pub fn u0_conf0(&self) -> &U_CONF0

0x00 - U0_CONF0

source

pub fn u1_conf0(&self) -> &U_CONF0

0x0c - U1_CONF0

source

pub fn u2_conf0(&self) -> &U_CONF0

0x18 - U2_CONF0

source

pub fn u3_conf0(&self) -> &U_CONF0

0x24 - U3_CONF0

source

pub fn u4_conf0(&self) -> &U_CONF0

0x30 - U4_CONF0

source

pub fn u5_conf0(&self) -> &U_CONF0

0x3c - U5_CONF0

source

pub fn u6_conf0(&self) -> &U_CONF0

0x48 - U6_CONF0

source

pub fn u7_conf0(&self) -> &U_CONF0

0x54 - U7_CONF0

source

pub fn u_conf1(&self, n: usize) -> &U_CONF1

0x04..0x24 -

source

pub fn u_conf1_iter(&self) -> impl Iterator<Item = &U_CONF1>

Iterator for array of: 0x04..0x24 -

source

pub fn u0_conf1(&self) -> &U_CONF1

0x04 - U0_CONF1

source

pub fn u1_conf1(&self) -> &U_CONF1

0x10 - U1_CONF1

source

pub fn u2_conf1(&self) -> &U_CONF1

0x1c - U2_CONF1

source

pub fn u3_conf1(&self) -> &U_CONF1

0x28 - U3_CONF1

source

pub fn u4_conf1(&self) -> &U_CONF1

0x34 - U4_CONF1

source

pub fn u5_conf1(&self) -> &U_CONF1

0x40 - U5_CONF1

source

pub fn u6_conf1(&self) -> &U_CONF1

0x4c - U6_CONF1

source

pub fn u7_conf1(&self) -> &U_CONF1

0x58 - U7_CONF1

source

pub fn u_conf2(&self, n: usize) -> &U_CONF2

0x08..0x28 -

source

pub fn u_conf2_iter(&self) -> impl Iterator<Item = &U_CONF2>

Iterator for array of: 0x08..0x28 -

source

pub fn u0_conf2(&self) -> &U_CONF2

0x08 - U0_CONF2

source

pub fn u1_conf2(&self) -> &U_CONF2

0x14 - U1_CONF2

source

pub fn u2_conf2(&self) -> &U_CONF2

0x20 - U2_CONF2

source

pub fn u3_conf2(&self) -> &U_CONF2

0x2c - U3_CONF2

source

pub fn u4_conf2(&self) -> &U_CONF2

0x38 - U4_CONF2

source

pub fn u5_conf2(&self) -> &U_CONF2

0x44 - U5_CONF2

source

pub fn u6_conf2(&self) -> &U_CONF2

0x50 - U6_CONF2

source

pub fn u7_conf2(&self) -> &U_CONF2

0x5c - U7_CONF2

source

pub fn u_cnt(&self, n: usize) -> &U_CNT

0x60..0x80 -

source

pub fn u_cnt_iter(&self) -> impl Iterator<Item = &U_CNT>

Iterator for array of: 0x60..0x80 -

source

pub fn u0_cnt(&self) -> &U_CNT

0x60 - U0_CNT

source

pub fn u1_cnt(&self) -> &U_CNT

0x64 - U1_CNT

source

pub fn u2_cnt(&self) -> &U_CNT

0x68 - U2_CNT

source

pub fn u3_cnt(&self) -> &U_CNT

0x6c - U3_CNT

source

pub fn u4_cnt(&self) -> &U_CNT

0x70 - U4_CNT

source

pub fn u5_cnt(&self) -> &U_CNT

0x74 - U5_CNT

source

pub fn u6_cnt(&self) -> &U_CNT

0x78 - U6_CNT

source

pub fn u7_cnt(&self) -> &U_CNT

0x7c - U7_CNT

source

pub fn int_raw(&self) -> &INT_RAW

0x80 -

source

pub fn int_st(&self) -> &INT_ST

0x84 -

source

pub fn int_ena(&self) -> &INT_ENA

0x88 -

source

pub fn int_clr(&self) -> &INT_CLR

0x8c -

source

pub fn u_status(&self, n: usize) -> &U_STATUS

0x90..0xb0 -

source

pub fn u_status_iter(&self) -> impl Iterator<Item = &U_STATUS>

Iterator for array of: 0x90..0xb0 -

source

pub fn u0_status(&self) -> &U_STATUS

0x90 - U0_STATUS

source

pub fn u1_status(&self) -> &U_STATUS

0x94 - U1_STATUS

source

pub fn u2_status(&self) -> &U_STATUS

0x98 - U2_STATUS

source

pub fn u3_status(&self) -> &U_STATUS

0x9c - U3_STATUS

source

pub fn u4_status(&self) -> &U_STATUS

0xa0 - U4_STATUS

source

pub fn u5_status(&self) -> &U_STATUS

0xa4 - U5_STATUS

source

pub fn u6_status(&self) -> &U_STATUS

0xa8 - U6_STATUS

source

pub fn u7_status(&self) -> &U_STATUS

0xac - U7_STATUS

source

pub fn ctrl(&self) -> &CTRL

0xb0 -

source

pub fn date(&self) -> &DATE

0xfc -

Trait Implementations§

source§

impl Debug for PCNT

source§

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

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

impl Deref for PCNT

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl Send for PCNT

Auto Trait Implementations§

§

impl Freeze for PCNT

§

impl RefUnwindSafe for PCNT

§

impl !Sync for PCNT

§

impl Unpin for PCNT

§

impl UnwindSafe for PCNT

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.