Type Alias W

Source
pub type W = W<GPIO_CONFIG_SPEC>;
Expand description

Register gpio_config[%s] writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

Source§

impl W

Source

pub fn input_function(&mut self) -> INPUT_FUNCTION_W<'_, GPIO_CONFIG_SPEC>

Bit 0 - Enable input signal

Source

pub fn schmitt(&mut self) -> SCHMITT_W<'_, GPIO_CONFIG_SPEC>

Bit 1 - Enable schmitt trigger

Source

pub fn drive(&mut self) -> DRIVE_W<'_, GPIO_CONFIG_SPEC>

Bits 2:3 - Drive strength

Source

pub fn pull_up(&mut self) -> PULL_UP_W<'_, GPIO_CONFIG_SPEC>

Bit 4 - Enable internal pull-up

Source

pub fn pull_down(&mut self) -> PULL_DOWN_W<'_, GPIO_CONFIG_SPEC>

Bit 5 - Enable internal pull-down

Source

pub fn output_function(&mut self) -> OUTPUT_FUNCTION_W<'_, GPIO_CONFIG_SPEC>

Bit 6 - Enable output signal

Source

pub fn alternate(&mut self) -> ALTERNATE_W<'_, GPIO_CONFIG_SPEC>

Bits 8:12 - Pin alternate function switch

Source

pub fn interrupt_mode(&mut self) -> INTERRUPT_MODE_W<'_, GPIO_CONFIG_SPEC>

Bits 16:19 - Select pin interrupt mode

Source

pub fn interrupt_clear(&mut self) -> INTERRUPT_CLEAR_W<'_, GPIO_CONFIG_SPEC>

Bit 20 - Clear pin interrupt flag

Source

pub fn interrupt_mask(&mut self) -> INTERRUPT_MASK_W<'_, GPIO_CONFIG_SPEC>

Bit 22 - Pin interrupt mask

Source

pub fn output_value(&mut self) -> OUTPUT_VALUE_W<'_, GPIO_CONFIG_SPEC>

Bit 24 - Output value

Source

pub fn output_set(&mut self) -> OUTPUT_SET_W<'_, GPIO_CONFIG_SPEC>

Bit 25 - Set output value to 1

When sets and clears at the same, only set will take effect.

Source

pub fn output_clear(&mut self) -> OUTPUT_CLEAR_W<'_, GPIO_CONFIG_SPEC>

Bit 26 - Clear output value to 0

When sets and clears at the same, only set will take effect.

Source

pub fn pin_mode(&mut self) -> PIN_MODE_W<'_, GPIO_CONFIG_SPEC>

Bits 30:31 - Pin input/output mode switch

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