Struct esp32p4::LP_ADC

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

Low-power Analog to Digital Converter

Implementations§

source§

impl LP_ADC

source

pub const PTR: *const RegisterBlock = {0x50127000 as *const lp_adc::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 reader1_ctrl(&self) -> &READER1_CTRL

0x00 - Control the read operation of ADC1.

source

pub fn reader1_status(&self) -> &READER1_STATUS

0x04 - N/A

source

pub fn meas1_ctrl1(&self) -> &MEAS1_CTRL1

0x08 - N/A

source

pub fn meas1_ctrl2(&self) -> &MEAS1_CTRL2

0x0c - ADC1 configuration registers.

source

pub fn meas1_mux(&self) -> &MEAS1_MUX

0x10 - SAR ADC1 MUX register.

source

pub fn atten1(&self) -> &ATTEN1

0x14 - ADC1 attenuation registers.

source

pub fn amp_ctrl1(&self) -> &AMP_CTRL1

0x18 - N/A

source

pub fn amp_ctrl2(&self) -> &AMP_CTRL2

0x1c - N/A

source

pub fn amp_ctrl3(&self) -> &AMP_CTRL3

0x20 - N/A

source

pub fn reader2_ctrl(&self) -> &READER2_CTRL

0x24 - Control the read operation of ADC2.

source

pub fn reader2_status(&self) -> &READER2_STATUS

0x28 - N/A

source

pub fn meas2_ctrl1(&self) -> &MEAS2_CTRL1

0x2c - ADC2 configuration registers.

source

pub fn meas2_ctrl2(&self) -> &MEAS2_CTRL2

0x30 - ADC2 configuration registers.

source

pub fn meas2_mux(&self) -> &MEAS2_MUX

0x34 - SAR ADC2 MUX register.

source

pub fn atten2(&self) -> &ATTEN2

0x38 - ADC1 attenuation registers.

source

pub fn force_wpd_sar(&self) -> &FORCE_WPD_SAR

0x3c - In sleep, force to use rtc to control ADC

source

pub fn meas_status(&self) -> &MEAS_STATUS

0x40 - N/A

source

pub fn reg_clken(&self) -> &REG_CLKEN

0x44 - N/A

source

pub fn cocpu_int_raw(&self) -> &COCPU_INT_RAW

0x48 - Interrupt raw registers.

source

pub fn int_ena(&self) -> &INT_ENA

0x4c - Interrupt enable registers.

source

pub fn int_st(&self) -> &INT_ST

0x50 - Interrupt status registers.

source

pub fn int_clr(&self) -> &INT_CLR

0x54 - Interrupt clear registers.

source

pub fn int_ena_w1ts(&self) -> &INT_ENA_W1TS

0x58 - Interrupt enable assert registers.

source

pub fn int_ena_w1tc(&self) -> &INT_ENA_W1TC

0x5c - Interrupt enable deassert registers.

source

pub fn wakeup1(&self) -> &WAKEUP1

0x60 - ADC1 wakeup configuration registers.

source

pub fn wakeup2(&self) -> &WAKEUP2

0x64 - ADC2 wakeup configuration registers.

source

pub fn wakeup_sel(&self) -> &WAKEUP_SEL

0x68 - Wakeup source select register.

source

pub fn sar1_hw_wakeup(&self) -> &SAR1_HW_WAKEUP

0x6c - Hardware automatic sampling registers for wakeup function.

source

pub fn sar2_hw_wakeup(&self) -> &SAR2_HW_WAKEUP

0x70 - Hardware automatic sampling registers for wakeup function.

source

pub fn rnd_eco_low(&self) -> &RND_ECO_LOW

0x74 - N/A

source

pub fn rnd_eco_high(&self) -> &RND_ECO_HIGH

0x78 - N/A

source

pub fn rnd_eco_cs(&self) -> &RND_ECO_CS

0x7c - N/A

Trait Implementations§

source§

impl Debug for LP_ADC

source§

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

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

impl Deref for LP_ADC

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl Send for LP_ADC

Auto Trait Implementations§

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.