Type Alias nrf52840_pac::gpiote::config::POLARITY_W

source ·
pub type POLARITY_W<'a, const O: u8> = FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, POLARITY_A, 2, O>;
Expand description

Field POLARITY writer - When In task mode: Operation to be performed on output when OUT[n] task is triggered. When In event mode: Operation on input that shall trigger IN[n] event.

Aliased Type§

struct POLARITY_W<'a, const O: u8> { /* private fields */ }

Implementations§

source§

impl<'a, const O: u8> POLARITY_W<'a, O>

source

pub fn none(self) -> &'a mut W

Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity.

source

pub fn lo_to_hi(self) -> &'a mut W

Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin.

source

pub fn hi_to_lo(self) -> &'a mut W

Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin.

source

pub fn toggle(self) -> &'a mut W

Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin.