Type Alias atsame54n::ac::compctrl::W

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

Register COMPCTRL[%s] writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn enable(&mut self) -> ENABLE_W<'_, COMPCTRL_SPEC, 1>

Bit 1 - Enable

source

pub fn single(&mut self) -> SINGLE_W<'_, COMPCTRL_SPEC, 2>

Bit 2 - Single-Shot Mode

source

pub fn intsel(&mut self) -> INTSEL_W<'_, COMPCTRL_SPEC, 3>

Bits 3:4 - Interrupt Selection

source

pub fn runstdby(&mut self) -> RUNSTDBY_W<'_, COMPCTRL_SPEC, 6>

Bit 6 - Run in Standby

source

pub fn muxneg(&mut self) -> MUXNEG_W<'_, COMPCTRL_SPEC, 8>

Bits 8:10 - Negative Input Mux Selection

source

pub fn muxpos(&mut self) -> MUXPOS_W<'_, COMPCTRL_SPEC, 12>

Bits 12:14 - Positive Input Mux Selection

source

pub fn swap(&mut self) -> SWAP_W<'_, COMPCTRL_SPEC, 15>

Bit 15 - Swap Inputs and Invert

source

pub fn speed(&mut self) -> SPEED_W<'_, COMPCTRL_SPEC, 16>

Bits 16:17 - Speed Selection

source

pub fn hysten(&mut self) -> HYSTEN_W<'_, COMPCTRL_SPEC, 19>

Bit 19 - Hysteresis Enable

source

pub fn hyst(&mut self) -> HYST_W<'_, COMPCTRL_SPEC, 20>

Bits 20:21 - Hysteresis Level

source

pub fn flen(&mut self) -> FLEN_W<'_, COMPCTRL_SPEC, 24>

Bits 24:26 - Filter Length

source

pub fn out(&mut self) -> OUT_W<'_, COMPCTRL_SPEC, 28>

Bits 28:29 - Output

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