Type Alias s2pac_ch32v103::adc::samptr2::W

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

Register SAMPTR2 writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn smp0(&mut self) -> SMP0_W<'_, SAMPTR2_SPEC>

Bits 0:2 - Channel 0 sample time selection

source

pub fn smp1(&mut self) -> SMP1_W<'_, SAMPTR2_SPEC>

Bits 3:5 - Channel 1 sample time selection

source

pub fn smp2(&mut self) -> SMP2_W<'_, SAMPTR2_SPEC>

Bits 6:8 - Channel 2 sample time selection

source

pub fn smp3(&mut self) -> SMP3_W<'_, SAMPTR2_SPEC>

Bits 9:11 - Channel 3 sample time selection

source

pub fn smp4(&mut self) -> SMP4_W<'_, SAMPTR2_SPEC>

Bits 12:14 - Channel 4 sample time selection

source

pub fn smp5(&mut self) -> SMP5_W<'_, SAMPTR2_SPEC>

Bits 15:17 - Channel 5 sample time selection

source

pub fn smp6(&mut self) -> SMP6_W<'_, SAMPTR2_SPEC>

Bits 18:20 - Channel 6 sample time selection

source

pub fn smp7(&mut self) -> SMP7_W<'_, SAMPTR2_SPEC>

Bits 21:23 - Channel 7 sample time selection

source

pub fn smp8(&mut self) -> SMP8_W<'_, SAMPTR2_SPEC>

Bits 24:26 - Channel 8 sample time selection

source

pub fn smp9(&mut self) -> SMP9_W<'_, SAMPTR2_SPEC>

Bits 27:29 - Channel 9 sample time selection

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