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
impl W
sourcepub fn en(&mut self) -> EN_W<'_, CS_SPEC>
pub fn en(&mut self) -> EN_W<'_, CS_SPEC>
Bit 0 - Power on ADC and enable its clock.
1 - enabled. 0 - disabled.
sourcepub fn ts_en(&mut self) -> TS_EN_W<'_, CS_SPEC>
pub fn ts_en(&mut self) -> TS_EN_W<'_, CS_SPEC>
Bit 1 - Power on temperature sensor. 1 - enabled. 0 - disabled.
sourcepub fn start_once(&mut self) -> START_ONCE_W<'_, CS_SPEC>
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.
sourcepub fn start_many(&mut self) -> START_MANY_W<'_, CS_SPEC>
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.
sourcepub fn err_sticky(&mut self) -> ERR_STICKY_W<'_, CS_SPEC>
pub fn err_sticky(&mut self) -> ERR_STICKY_W<'_, CS_SPEC>
Bit 10 - Some past ADC conversion encountered an error. Write 1 to clear.
sourcepub fn ainsel(&mut self) -> AINSEL_W<'_, CS_SPEC>
pub fn ainsel(&mut self) -> AINSEL_W<'_, CS_SPEC>
Bits 12:14 - Select analog mux input. Updated automatically in round-robin mode.
sourcepub fn rrobin(&mut self) -> RROBIN_W<'_, CS_SPEC>
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.