Trait esp32c2_hal::gpio::Pin

source ·
pub trait Pin {
    // Required methods
    fn number(&self) -> u8;
    fn sleep_mode(&mut self, on: bool);
    fn set_alternate_function(&mut self, alternate: AlternateFunction);
    fn is_listening(&self) -> bool;
    fn listen_with_options(
        &mut self,
        event: Event,
        int_enable: bool,
        nmi_enable: bool,
        wake_up_from_light_sleep: bool
    );
    fn unlisten(&mut self);
    fn clear_interrupt(&mut self);

    // Provided method
    fn listen(&mut self, event: Event) { ... }
}

Required Methods§

source

fn number(&self) -> u8

source

fn sleep_mode(&mut self, on: bool)

source

fn set_alternate_function(&mut self, alternate: AlternateFunction)

source

fn is_listening(&self) -> bool

source

fn listen_with_options( &mut self, event: Event, int_enable: bool, nmi_enable: bool, wake_up_from_light_sleep: bool )

source

fn unlisten(&mut self)

source

fn clear_interrupt(&mut self)

Provided Methods§

source

fn listen(&mut self, event: Event)

Implementors§

source§

impl<MODE, const GPIONUM: u8> Pin for GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties,