Type Alias rp2040_pac::pio0::sm::sm_pinctrl::W

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

Register SM_PINCTRL writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn out_base(&mut self) -> OUT_BASE_W<'_, SM_PINCTRL_SPEC>

Bits 0:4 - The lowest-numbered pin that will be affected by an OUT PINS, OUT PINDIRS or MOV PINS instruction. The data written to this pin will always be the least-significant bit of the OUT or MOV data.

source

pub fn set_base(&mut self) -> SET_BASE_W<'_, SM_PINCTRL_SPEC>

Bits 5:9 - The lowest-numbered pin that will be affected by a SET PINS or SET PINDIRS instruction. The data written to this pin is the least-significant bit of the SET data.

source

pub fn sideset_base(&mut self) -> SIDESET_BASE_W<'_, SM_PINCTRL_SPEC>

Bits 10:14 - The lowest-numbered pin that will be affected by a side-set operation. The MSBs of an instruction’s side-set/delay field (up to 5, determined by SIDESET_COUNT) are used for side-set data, with the remaining LSBs used for delay. The least-significant bit of the side-set portion is the bit written to this pin, with more-significant bits written to higher-numbered pins.

source

pub fn in_base(&mut self) -> IN_BASE_W<'_, SM_PINCTRL_SPEC>

Bits 15:19 - The pin which is mapped to the least-significant bit of a state machine’s IN data bus. Higher-numbered pins are mapped to consecutively more-significant data bits, with a modulo of 32 applied to pin number.

source

pub fn out_count(&mut self) -> OUT_COUNT_W<'_, SM_PINCTRL_SPEC>

Bits 20:25 - The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive.

source

pub fn set_count(&mut self) -> SET_COUNT_W<'_, SM_PINCTRL_SPEC>

Bits 26:28 - The number of pins asserted by a SET. In the range 0 to 5 inclusive.

source

pub fn sideset_count(&mut self) -> SIDESET_COUNT_W<'_, SM_PINCTRL_SPEC>

Bits 29:31 - The number of MSBs of the Delay/Side-set instruction field which are used for side-set. Inclusive of the enable bit, if present. Minimum of 0 (all delay bits, no side-set) and maximum of 5 (all side-set, no delay).

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