Trait avr_oxide::hal::generic::port::base::AtmelPortControl

source ·
pub trait AtmelPortControl {
    // Required methods
    fn enable_output(&mut self, p: u8);
    fn disable_output(&mut self, p: u8);
    fn enable_pullup(&mut self, p: u8);
    fn disable_pullup(&mut self, p: u8);
    fn set_high(&mut self, p: u8);
    fn set_low(&mut self, p: u8);
    fn toggle(&mut self, p: u8);
    fn get(&self, p: u8) -> bool;
    fn set_interrupt_mode(&mut self, p: u8, mode: InterruptMode);
    fn isr(
        &'static mut self,
        isotoken: Isolated,
        get_pin: fn(_: u8) -> &'static dyn Pin
    );
    fn listen(&'static self, p: u8, handler: PinIsrCallback);
}

Required Methods§

source

fn enable_output(&mut self, p: u8)

Set this pin as an output.

source

fn disable_output(&mut self, p: u8)

Disable output on this pin

source

fn enable_pullup(&mut self, p: u8)

Enable internal pullup on this pin

source

fn disable_pullup(&mut self, p: u8)

Disable internal pullup on this pin

source

fn set_high(&mut self, p: u8)

Set a pin’s output state high

source

fn set_low(&mut self, p: u8)

Set a pin’s output state low

source

fn toggle(&mut self, p: u8)

Toggle a pin’s input state

source

fn get(&self, p: u8) -> bool

Get a pin’s state

source

fn set_interrupt_mode(&mut self, p: u8, mode: InterruptMode)

Set the mode for interrupt generation for a pin

source

fn isr( &'static mut self, isotoken: Isolated, get_pin: fn(_: u8) -> &'static dyn Pin )

Interrupt service routine. Dispatch any listeners for this port.

source

fn listen(&'static self, p: u8, handler: PinIsrCallback)

Add a listener to this port for the given pin

Implementors§