Type Alias rp2040_pac::adc::cs::R

source ·
pub type R = R<CS_SPEC>;
Expand description

Register CS reader

Aliased Type§

struct R { /* private fields */ }

Implementations§

source§

impl R

source

pub fn en(&self) -> EN_R

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

source

pub fn ts_en(&self) -> TS_EN_R

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

source

pub fn start_once(&self) -> START_ONCE_R

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

source

pub fn start_many(&self) -> START_MANY_R

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

source

pub fn ready(&self) -> READY_R

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

source

pub fn err(&self) -> ERR_R

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

source

pub fn err_sticky(&self) -> ERR_STICKY_R

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

source

pub fn ainsel(&self) -> AINSEL_R

Bits 12:14 - Select analog mux input. Updated automatically in round-robin mode.

source

pub fn rrobin(&self) -> RROBIN_R

Bits 16:20 - 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.