Struct rp2040_pac2::adc::regs::Cs[][src]

#[repr(transparent)]pub struct Cs(pub u32);

ADC Control and Status

Implementations

impl Cs[src]

pub const fn rrobin(&self) -> u8[src]

Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel.

pub fn set_rrobin(&mut self, val: u8)[src]

Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel.

pub const fn ainsel(&self) -> u8[src]

Select analog mux input. Updated automatically in round-robin mode.

pub fn set_ainsel(&mut self, val: u8)[src]

Select analog mux input. Updated automatically in round-robin mode.

pub const fn err_sticky(&self) -> bool[src]

Some past ADC conversion encountered an error. Write 1 to clear.

pub fn set_err_sticky(&mut self, val: bool)[src]

Some past ADC conversion encountered an error. Write 1 to clear.

pub const fn err(&self) -> bool[src]

The most recent ADC conversion encountered an error; result is undefined or noisy.

pub fn set_err(&mut self, val: bool)[src]

The most recent ADC conversion encountered an error; result is undefined or noisy.

pub const fn ready(&self) -> bool[src]

1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress.

pub fn set_ready(&mut self, val: bool)[src]

1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress.

pub const fn start_many(&self) -> bool[src]

Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes.

pub fn set_start_many(&mut self, val: bool)[src]

Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes.

pub const fn start_once(&self) -> bool[src]

Start a single conversion. Self-clearing. Ignored if start_many is asserted.

pub fn set_start_once(&mut self, val: bool)[src]

Start a single conversion. Self-clearing. Ignored if start_many is asserted.

pub const fn ts_en(&self) -> bool[src]

Power on temperature sensor. 1 - enabled. 0 - disabled.

pub fn set_ts_en(&mut self, val: bool)[src]

Power on temperature sensor. 1 - enabled. 0 - disabled.

pub const fn en(&self) -> bool[src]

Power on ADC and enable its clock. 1 - enabled. 0 - disabled.

pub fn set_en(&mut self, val: bool)[src]

Power on ADC and enable its clock. 1 - enabled. 0 - disabled.

Trait Implementations

impl Clone for Cs[src]

impl Copy for Cs[src]

impl Default for Cs[src]

Auto Trait Implementations

impl Send for Cs

impl Sync for Cs

impl Unpin for Cs

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.