Struct avr_oxide::hal::generic::port::base::zeroseries::PortRegisterBlock

source ·
#[repr(C)]
pub struct PortRegisterBlock { /* private fields */ }
Expand description

The AVR port control register block. The structure provided by the auto-generated avr-device crate is just horrible, so we use our own rendition. This allows accessing pin control by index, and also avoids having different types for every port.

Trait Implementations§

source§

impl AtmelPortControl for PortRegisterBlock

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.