pub struct Port<'a, const N: usize> { /* private fields */ }
Expand description
A GPIO port, like GPIO3
Port
s contain collections of pins. Use Port
s to access pin by their
GPIO offset. See the module-level docs for an example.
Implementations§
Source§impl<'a, const N: usize> Port<'a, N>
Implementation of a port, generic over the number of
pins
impl<'a, const N: usize> Port<'a, N>
Implementation of a port, generic over the number of pins
pub fn is_enabled_clock(&self) -> bool
pub fn enable_clock(&self)
pub fn disable_clock(&self)
Sourcepub const fn pin(&self, offset: usize) -> &Pin<'a>
pub const fn pin(&self, offset: usize) -> &Pin<'a>
Returns the GPIO pin in this port
This is an alterative API to Ports::pin
that maps more closely
to the GPIO offset.
pub fn handle_interrupt(&self)
Auto Trait Implementations§
impl<'a, const N: usize> !Freeze for Port<'a, N>
impl<'a, const N: usize> !RefUnwindSafe for Port<'a, N>
impl<'a, const N: usize> !Send for Port<'a, N>
impl<'a, const N: usize> !Sync for Port<'a, N>
impl<'a, const N: usize> Unpin for Port<'a, N>
impl<'a, const N: usize> !UnwindSafe for Port<'a, N>
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