pub struct Pins<'a> {
pub pins: [GpioPin<'a>; 64],
pub inputmux: Inputmux,
pub iocon: Iocon,
pub pint: Pint<'a>,
}Fields§
§pins: [GpioPin<'a>; 64]§inputmux: Inputmux§iocon: Iocon§pint: Pint<'a>Implementations§
Source§impl<'a> Pins<'a>
impl<'a> Pins<'a>
pub const fn new() -> Self
Sourcepub fn get_pin(&self, searched_pin: LPCPin) -> &GpioPin<'a>
pub fn get_pin(&self, searched_pin: LPCPin) -> &GpioPin<'a>
Returns a reference to the GPIO pin corresponding to the given LPCPin.
§Panics
This function will never panic because:
searched_pinis anLPCPinenum, which only has valid, in‑range discriminants.- Each valid
LPCPinmaps to a slot inself.pins, so the index is always within bounds. - During initialization, all entries in
self.pinsare guaranteed to be populated (Some), so calling.unwrap()is safe.
Therefore, both the array indexing and the unwrap() are guaranteed not to fail.
pub fn handle_interrupt(&self)
pub fn set_inputmux(&'a self)
pub fn set_iocon(&'a self)
pub fn set_pint(&'a self)
pub fn init(&'a self)
Auto Trait Implementations§
impl<'a> !Freeze for Pins<'a>
impl<'a> !RefUnwindSafe for Pins<'a>
impl<'a> !Send for Pins<'a>
impl<'a> !Sync for Pins<'a>
impl<'a> Unpin for Pins<'a>
impl<'a> !UnwindSafe for Pins<'a>
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