pub struct LP_ADC { /* private fields */ }
Expand description
Low-power Analog to Digital Converter
Implementations§
source§impl LP_ADC
impl LP_ADC
sourcepub const PTR: *const RegisterBlock = {0x50127000 as *const lp_adc::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x50127000 as *const lp_adc::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
sourcepub unsafe fn steal() -> Self
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>§
sourcepub fn reader1_ctrl(&self) -> &READER1_CTRL
pub fn reader1_ctrl(&self) -> &READER1_CTRL
0x00 - Control the read operation of ADC1.
sourcepub fn reader1_status(&self) -> &READER1_STATUS
pub fn reader1_status(&self) -> &READER1_STATUS
0x04 - N/A
sourcepub fn meas1_ctrl1(&self) -> &MEAS1_CTRL1
pub fn meas1_ctrl1(&self) -> &MEAS1_CTRL1
0x08 - N/A
sourcepub fn meas1_ctrl2(&self) -> &MEAS1_CTRL2
pub fn meas1_ctrl2(&self) -> &MEAS1_CTRL2
0x0c - ADC1 configuration registers.
sourcepub fn reader2_ctrl(&self) -> &READER2_CTRL
pub fn reader2_ctrl(&self) -> &READER2_CTRL
0x24 - Control the read operation of ADC2.
sourcepub fn reader2_status(&self) -> &READER2_STATUS
pub fn reader2_status(&self) -> &READER2_STATUS
0x28 - N/A
sourcepub fn meas2_ctrl1(&self) -> &MEAS2_CTRL1
pub fn meas2_ctrl1(&self) -> &MEAS2_CTRL1
0x2c - ADC2 configuration registers.
sourcepub fn meas2_ctrl2(&self) -> &MEAS2_CTRL2
pub fn meas2_ctrl2(&self) -> &MEAS2_CTRL2
0x30 - ADC2 configuration registers.
sourcepub fn force_wpd_sar(&self) -> &FORCE_WPD_SAR
pub fn force_wpd_sar(&self) -> &FORCE_WPD_SAR
0x3c - In sleep, force to use rtc to control ADC
sourcepub fn meas_status(&self) -> &MEAS_STATUS
pub fn meas_status(&self) -> &MEAS_STATUS
0x40 - N/A
sourcepub fn cocpu_int_raw(&self) -> &COCPU_INT_RAW
pub fn cocpu_int_raw(&self) -> &COCPU_INT_RAW
0x48 - Interrupt raw registers.
sourcepub fn int_ena_w1ts(&self) -> &INT_ENA_W1TS
pub fn int_ena_w1ts(&self) -> &INT_ENA_W1TS
0x58 - Interrupt enable assert registers.
sourcepub fn int_ena_w1tc(&self) -> &INT_ENA_W1TC
pub fn int_ena_w1tc(&self) -> &INT_ENA_W1TC
0x5c - Interrupt enable deassert registers.
sourcepub fn wakeup_sel(&self) -> &WAKEUP_SEL
pub fn wakeup_sel(&self) -> &WAKEUP_SEL
0x68 - Wakeup source select register.
sourcepub fn sar1_hw_wakeup(&self) -> &SAR1_HW_WAKEUP
pub fn sar1_hw_wakeup(&self) -> &SAR1_HW_WAKEUP
0x6c - Hardware automatic sampling registers for wakeup function.
sourcepub fn sar2_hw_wakeup(&self) -> &SAR2_HW_WAKEUP
pub fn sar2_hw_wakeup(&self) -> &SAR2_HW_WAKEUP
0x70 - Hardware automatic sampling registers for wakeup function.
sourcepub fn rnd_eco_low(&self) -> &RND_ECO_LOW
pub fn rnd_eco_low(&self) -> &RND_ECO_LOW
0x74 - N/A
sourcepub fn rnd_eco_high(&self) -> &RND_ECO_HIGH
pub fn rnd_eco_high(&self) -> &RND_ECO_HIGH
0x78 - N/A
sourcepub fn rnd_eco_cs(&self) -> &RND_ECO_CS
pub fn rnd_eco_cs(&self) -> &RND_ECO_CS
0x7c - N/A