Type Alias rp2040_pac::adc::cs::W

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

Register CS writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn en(&mut self) -> EN_W<'_, CS_SPEC>

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

source

pub fn ts_en(&mut self) -> TS_EN_W<'_, CS_SPEC>

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

source

pub fn start_once(&mut self) -> START_ONCE_W<'_, CS_SPEC>

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

source

pub fn start_many(&mut self) -> START_MANY_W<'_, CS_SPEC>

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

source

pub fn err_sticky(&mut self) -> ERR_STICKY_W<'_, CS_SPEC>

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

source

pub fn ainsel(&mut self) -> AINSEL_W<'_, CS_SPEC>

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

source

pub fn rrobin(&mut self) -> RROBIN_W<'_, CS_SPEC>

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.

source

pub unsafe fn bits(&mut self, bits: u32) -> &mut Self

Writes raw bits to the register.

§Safety

Passing incorrect value can cause undefined behaviour. See reference manual