Struct PCNT

Source
pub struct PCNT { /* private fields */ }

Implementations§

Source§

impl PCNT

Source

pub const PTR: *const <PCNT as Deref>::Target = {0x60012000 as *const <esp32c6::PCNT as core::ops::Deref>::Target}

Pointer to the register block

Source

pub unsafe fn steal() -> PCNT

Unsafely create an instance of this peripheral out of thin air.

§Safety

You must ensure that you’re only using one instance of this type at a time.

Source

pub const fn ptr() -> *const <PCNT as Deref>::Target

Return the pointer to the register block

Methods from Deref<Target = RegisterBlock>§

Source

pub fn u_conf0(&self, n: usize) -> &Reg<U_CONF0_SPEC>

0x00..0x10 - Configuration register 0 for unit %s

Source

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

Iterator for array of: 0x00..0x10 - Configuration register 0 for unit %s

Source

pub fn u0_conf0(&self) -> &Reg<U_CONF0_SPEC>

0x00 - Configuration register 0 for unit 0

Source

pub fn u1_conf0(&self) -> &Reg<U_CONF0_SPEC>

0x0c - Configuration register 0 for unit 1

Source

pub fn u2_conf0(&self) -> &Reg<U_CONF0_SPEC>

0x18 - Configuration register 0 for unit 2

Source

pub fn u3_conf0(&self) -> &Reg<U_CONF0_SPEC>

0x24 - Configuration register 0 for unit 3

Source

pub fn u_conf1(&self, n: usize) -> &Reg<U_CONF1_SPEC>

0x04..0x14 - Configuration register 1 for unit %s

Source

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

Iterator for array of: 0x04..0x14 - Configuration register 1 for unit %s

Source

pub fn u0_conf1(&self) -> &Reg<U_CONF1_SPEC>

0x04 - Configuration register 1 for unit 0

Source

pub fn u1_conf1(&self) -> &Reg<U_CONF1_SPEC>

0x10 - Configuration register 1 for unit 1

Source

pub fn u2_conf1(&self) -> &Reg<U_CONF1_SPEC>

0x1c - Configuration register 1 for unit 2

Source

pub fn u3_conf1(&self) -> &Reg<U_CONF1_SPEC>

0x28 - Configuration register 1 for unit 3

Source

pub fn u_conf2(&self, n: usize) -> &Reg<U_CONF2_SPEC>

0x08..0x18 - Configuration register 2 for unit %s

Source

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

Iterator for array of: 0x08..0x18 - Configuration register 2 for unit %s

Source

pub fn u0_conf2(&self) -> &Reg<U_CONF2_SPEC>

0x08 - Configuration register 2 for unit 0

Source

pub fn u1_conf2(&self) -> &Reg<U_CONF2_SPEC>

0x14 - Configuration register 2 for unit 1

Source

pub fn u2_conf2(&self) -> &Reg<U_CONF2_SPEC>

0x20 - Configuration register 2 for unit 2

Source

pub fn u3_conf2(&self) -> &Reg<U_CONF2_SPEC>

0x2c - Configuration register 2 for unit 3

Source

pub fn u_cnt(&self, n: usize) -> &Reg<U_CNT_SPEC>

0x30..0x40 - Counter value for unit %s

Source

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

Iterator for array of: 0x30..0x40 - Counter value for unit %s

Source

pub fn u0_cnt(&self) -> &Reg<U_CNT_SPEC>

0x30 - Counter value for unit 0

Source

pub fn u1_cnt(&self) -> &Reg<U_CNT_SPEC>

0x34 - Counter value for unit 1

Source

pub fn u2_cnt(&self) -> &Reg<U_CNT_SPEC>

0x38 - Counter value for unit 2

Source

pub fn u3_cnt(&self) -> &Reg<U_CNT_SPEC>

0x3c - Counter value for unit 3

Source

pub fn int_raw(&self) -> &Reg<INT_RAW_SPEC>

0x40 - Interrupt raw status register

Source

pub fn int_st(&self) -> &Reg<INT_ST_SPEC>

0x44 - Interrupt status register

Source

pub fn int_ena(&self) -> &Reg<INT_ENA_SPEC>

0x48 - Interrupt enable register

Source

pub fn int_clr(&self) -> &Reg<INT_CLR_SPEC>

0x4c - Interrupt clear register

Source

pub fn u_status(&self, n: usize) -> &Reg<U_STATUS_SPEC>

0x50..0x60 - PNCT UNIT%s status register

Source

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

Iterator for array of: 0x50..0x60 - PNCT UNIT%s status register

Source

pub fn u0_status(&self) -> &Reg<U_STATUS_SPEC>

0x50 - PNCT UNIT0 status register

Source

pub fn u1_status(&self) -> &Reg<U_STATUS_SPEC>

0x54 - PNCT UNIT1 status register

Source

pub fn u2_status(&self) -> &Reg<U_STATUS_SPEC>

0x58 - PNCT UNIT2 status register

Source

pub fn u3_status(&self) -> &Reg<U_STATUS_SPEC>

0x5c - PNCT UNIT3 status register

Source

pub fn ctrl(&self) -> &Reg<CTRL_SPEC>

0x60 - Control register for all counters

Source

pub fn date(&self) -> &Reg<DATE_SPEC>

0xfc - PCNT version control register

Trait Implementations§

Source§

impl Debug for PCNT

Source§

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

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

impl Deref for PCNT

Source§

type Target = <PCNT as Deref>::Target

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<PCNT as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for PCNT

Source§

fn deref_mut(&mut self) -> &mut <PCNT as Deref>::Target

Mutably dereferences the value.
Source§

impl Peripheral for PCNT

Source§

type P = PCNT

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&mut self) -> <PCNT as Peripheral>::P

Unsafely clone (duplicate) a peripheral singleton. Read more
Source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more

Auto Trait Implementations§

§

impl Freeze for PCNT

§

impl RefUnwindSafe for PCNT

§

impl Send 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<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.