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§
sourcefn enable_output(&mut self, p: u8)
fn enable_output(&mut self, p: u8)
Set this pin as an output.
sourcefn disable_output(&mut self, p: u8)
fn disable_output(&mut self, p: u8)
Disable output on this pin
sourcefn enable_pullup(&mut self, p: u8)
fn enable_pullup(&mut self, p: u8)
Enable internal pullup on this pin
sourcefn disable_pullup(&mut self, p: u8)
fn disable_pullup(&mut self, p: u8)
Disable internal pullup on this pin
sourcefn set_interrupt_mode(&mut self, p: u8, mode: InterruptMode)
fn set_interrupt_mode(&mut self, p: u8, mode: InterruptMode)
Set the mode for interrupt generation for a pin
sourcefn isr(
&'static mut self,
isotoken: Isolated,
get_pin: fn(_: u8) -> &'static dyn Pin
)
fn isr( &'static mut self, isotoken: Isolated, get_pin: fn(_: u8) -> &'static dyn Pin )
Interrupt service routine. Dispatch any listeners for this port.
sourcefn listen(&'static self, p: u8, handler: PinIsrCallback)
fn listen(&'static self, p: u8, handler: PinIsrCallback)
Add a listener to this port for the given pin