Adc0

Struct Adc0 

Source
pub struct Adc0 { /* private fields */ }
Expand description

ADC

Implementations§

Source§

impl Adc0

Source

pub const PTR: *const RegisterBlock = {0x4013a000 as *const adc0::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 verid(&self) -> &Verid

0x00 - Version ID Register

Source

pub fn param(&self) -> &Param

0x04 - Parameter Register

Source

pub fn ctrl(&self) -> &Ctrl

0x10 - ADC Control Register

Source

pub fn stat(&self) -> &Stat

0x14 - ADC Status Register

Source

pub fn ie(&self) -> &Ie

0x18 - Interrupt Enable Register

Source

pub fn de(&self) -> &De

0x1c - DMA Enable Register

Source

pub fn cfg(&self) -> &Cfg

0x20 - ADC Configuration Register

Source

pub fn pause(&self) -> &Pause

0x24 - ADC Pause Register

Source

pub fn fctrl(&self) -> &Fctrl

0x30 - ADC FIFO Control Register

Source

pub fn swtrig(&self) -> &Swtrig

0x34 - Software Trigger Register

Source

pub fn tctrl(&self, n: usize) -> &Tctrl

0xc0..0x100 - Trigger Control Register

Source

pub fn tctrl_iter(&self) -> impl Iterator<Item = &Tctrl>

Iterator for array of: 0xc0..0x100 - Trigger Control Register

Source

pub fn cmdl(&self, n: usize) -> &Cmdl

0x100..0x13c - ADC Command Low Buffer Register

`n` is the index of register in the array. `n == 0` corresponds to `CMDL1` register.
Source

pub fn cmdl_iter(&self) -> impl Iterator<Item = &Cmdl>

Iterator for array of: 0x100..0x13c - ADC Command Low Buffer Register

Source

pub fn cmdl1(&self) -> &Cmdl

0x100 - ADC Command Low Buffer Register

Source

pub fn cmdl2(&self) -> &Cmdl

0x108 - ADC Command Low Buffer Register

Source

pub fn cmdl3(&self) -> &Cmdl

0x110 - ADC Command Low Buffer Register

Source

pub fn cmdl4(&self) -> &Cmdl

0x118 - ADC Command Low Buffer Register

Source

pub fn cmdl5(&self) -> &Cmdl

0x120 - ADC Command Low Buffer Register

Source

pub fn cmdl6(&self) -> &Cmdl

0x128 - ADC Command Low Buffer Register

Source

pub fn cmdl7(&self) -> &Cmdl

0x130 - ADC Command Low Buffer Register

Source

pub fn cmdl8(&self) -> &Cmdl

0x138 - ADC Command Low Buffer Register

Source

pub fn cmdl9(&self) -> &Cmdl

0x140 - ADC Command Low Buffer Register

Source

pub fn cmdl10(&self) -> &Cmdl

0x148 - ADC Command Low Buffer Register

Source

pub fn cmdl11(&self) -> &Cmdl

0x150 - ADC Command Low Buffer Register

Source

pub fn cmdl12(&self) -> &Cmdl

0x158 - ADC Command Low Buffer Register

Source

pub fn cmdl13(&self) -> &Cmdl

0x160 - ADC Command Low Buffer Register

Source

pub fn cmdl14(&self) -> &Cmdl

0x168 - ADC Command Low Buffer Register

Source

pub fn cmdl15(&self) -> &Cmdl

0x170 - ADC Command Low Buffer Register

Source

pub fn cmdh(&self, n: usize) -> &Cmdh

0x104..0x140 - ADC Command High Buffer Register

`n` is the index of register in the array. `n == 0` corresponds to `CMDH1` register.
Source

pub fn cmdh_iter(&self) -> impl Iterator<Item = &Cmdh>

Iterator for array of: 0x104..0x140 - ADC Command High Buffer Register

Source

pub fn cmdh1(&self) -> &Cmdh

0x104 - ADC Command High Buffer Register

Source

pub fn cmdh2(&self) -> &Cmdh

0x10c - ADC Command High Buffer Register

Source

pub fn cmdh3(&self) -> &Cmdh

0x114 - ADC Command High Buffer Register

Source

pub fn cmdh4(&self) -> &Cmdh

0x11c - ADC Command High Buffer Register

Source

pub fn cmdh5(&self) -> &Cmdh

0x124 - ADC Command High Buffer Register

Source

pub fn cmdh6(&self) -> &Cmdh

0x12c - ADC Command High Buffer Register

Source

pub fn cmdh7(&self) -> &Cmdh

0x134 - ADC Command High Buffer Register

Source

pub fn cmdh8(&self) -> &Cmdh

0x13c - ADC Command High Buffer Register

Source

pub fn cmdh9(&self) -> &Cmdh

0x144 - ADC Command High Buffer Register

Source

pub fn cmdh10(&self) -> &Cmdh

0x14c - ADC Command High Buffer Register

Source

pub fn cmdh11(&self) -> &Cmdh

0x154 - ADC Command High Buffer Register

Source

pub fn cmdh12(&self) -> &Cmdh

0x15c - ADC Command High Buffer Register

Source

pub fn cmdh13(&self) -> &Cmdh

0x164 - ADC Command High Buffer Register

Source

pub fn cmdh14(&self) -> &Cmdh

0x16c - ADC Command High Buffer Register

Source

pub fn cmdh15(&self) -> &Cmdh

0x174 - ADC Command High Buffer Register

Source

pub fn cv(&self, n: usize) -> &Cv

0x200..0x210 - Compare Value Register

`n` is the index of register in the array. `n == 0` corresponds to `CV1` register.
Source

pub fn cv_iter(&self) -> impl Iterator<Item = &Cv>

Iterator for array of: 0x200..0x210 - Compare Value Register

Source

pub fn cv1(&self) -> &Cv

0x200 - Compare Value Register

Source

pub fn cv2(&self) -> &Cv

0x204 - Compare Value Register

Source

pub fn cv3(&self) -> &Cv

0x208 - Compare Value Register

Source

pub fn cv4(&self) -> &Cv

0x20c - Compare Value Register

Source

pub fn resfifo(&self) -> &Resfifo

0x300 - ADC Data Result FIFO Register

Trait Implementations§

Source§

impl Debug for Adc0

Source§

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

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

impl Deref for Adc0

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl Send for Adc0

Auto Trait Implementations§

§

impl Freeze for Adc0

§

impl RefUnwindSafe for Adc0

§

impl !Sync for Adc0

§

impl Unpin for Adc0

§

impl UnwindSafe for Adc0

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.