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
impl AtmelPortControl for PortRegisterBlock
source§fn enable_output(&mut self, p: u8)
fn enable_output(&mut self, p: u8)
Set this pin as an output.
source§fn disable_output(&mut self, p: u8)
fn disable_output(&mut self, p: u8)
Disable output on this pin
source§fn enable_pullup(&mut self, p: u8)
fn enable_pullup(&mut self, p: u8)
Enable internal pullup on this pin
source§fn disable_pullup(&mut self, p: u8)
fn disable_pullup(&mut self, p: u8)
Disable internal pullup on this pin
source§fn 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
source§fn 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.
source§fn 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
Auto Trait Implementations§
impl Freeze for PortRegisterBlock
impl RefUnwindSafe for PortRegisterBlock
impl Send for PortRegisterBlock
impl Sync for PortRegisterBlock
impl Unpin for PortRegisterBlock
impl UnwindSafe for PortRegisterBlock
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more