Secgpio

Struct Secgpio 

Source
pub struct Secgpio { /* private fields */ }
Expand description

LPC-Next0 General Purpose I/O (GPIO)

Implementations§

Source§

impl Secgpio

Source

pub const PTR: *const RegisterBlock = {0x40154000 as *const gpio::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

Source

pub fn b(&self, n: usize) -> &B

0x00..0x100 - no description available

Source

pub fn b_iter(&self) -> impl Iterator<Item = &B>

Iterator for array of: 0x00..0x100 - no description available

Source

pub fn w(&self, n: usize) -> &W

0x1000..0x1400 - no description available

Source

pub fn w_iter(&self) -> impl Iterator<Item = &W>

Iterator for array of: 0x1000..0x1400 - no description available

Source

pub fn dir(&self, n: usize) -> &Dir

0x2000..0x2020 - Direction registers

Source

pub fn dir_iter(&self) -> impl Iterator<Item = &Dir>

Iterator for array of: 0x2000..0x2020 - Direction registers

Source

pub fn mask(&self, n: usize) -> &Mask

0x2080..0x20a0 - Mask register

Source

pub fn mask_iter(&self) -> impl Iterator<Item = &Mask>

Iterator for array of: 0x2080..0x20a0 - Mask register

Source

pub fn pin(&self, n: usize) -> &Pin

0x2100..0x2120 - Port pin register

Source

pub fn pin_iter(&self) -> impl Iterator<Item = &Pin>

Iterator for array of: 0x2100..0x2120 - Port pin register

Source

pub fn mpin(&self, n: usize) -> &Mpin

0x2180..0x21a0 - Masked port register

Source

pub fn mpin_iter(&self) -> impl Iterator<Item = &Mpin>

Iterator for array of: 0x2180..0x21a0 - Masked port register

Source

pub fn set(&self, n: usize) -> &Set

0x2200..0x2220 - Write: Set register for port Read: output bits for port

Source

pub fn set_iter(&self) -> impl Iterator<Item = &Set>

Iterator for array of: 0x2200..0x2220 - Write: Set register for port Read: output bits for port

Source

pub fn clr(&self, n: usize) -> &Clr

0x2280..0x22a0 - Clear port

Source

pub fn clr_iter(&self) -> impl Iterator<Item = &Clr>

Iterator for array of: 0x2280..0x22a0 - Clear port

Source

pub fn not(&self, n: usize) -> &Not

0x2300..0x2320 - Toggle port

Source

pub fn not_iter(&self) -> impl Iterator<Item = &Not>

Iterator for array of: 0x2300..0x2320 - Toggle port

Source

pub fn dirset(&self, n: usize) -> &Dirset

0x2380..0x23a0 - Set pin direction bits for port

Source

pub fn dirset_iter(&self) -> impl Iterator<Item = &Dirset>

Iterator for array of: 0x2380..0x23a0 - Set pin direction bits for port

Source

pub fn dirclr(&self, n: usize) -> &Dirclr

0x2400..0x2420 - Clear pin direction bits for port

Source

pub fn dirclr_iter(&self) -> impl Iterator<Item = &Dirclr>

Iterator for array of: 0x2400..0x2420 - Clear pin direction bits for port

Source

pub fn dirnot(&self, n: usize) -> &Dirnot

0x2480..0x24a0 - Toggle pin direction bits for port

Source

pub fn dirnot_iter(&self) -> impl Iterator<Item = &Dirnot>

Iterator for array of: 0x2480..0x24a0 - Toggle pin direction bits for port

Source

pub fn intena(&self, n: usize) -> &Intena

0x2500..0x2520 - interrupt A enable control register

Source

pub fn intena_iter(&self) -> impl Iterator<Item = &Intena>

Iterator for array of: 0x2500..0x2520 - interrupt A enable control register

Source

pub fn intenb(&self, n: usize) -> &Intenb

0x2580..0x25a0 - interrupt B enable control register

Source

pub fn intenb_iter(&self) -> impl Iterator<Item = &Intenb>

Iterator for array of: 0x2580..0x25a0 - interrupt B enable control register

Source

pub fn intpol(&self, n: usize) -> &Intpol

0x2600..0x2620 - interupt polarity control register

Source

pub fn intpol_iter(&self) -> impl Iterator<Item = &Intpol>

Iterator for array of: 0x2600..0x2620 - interupt polarity control register

Source

pub fn intedg(&self, n: usize) -> &Intedg

0x2680..0x26a0 - choose edge or level for interrupt

Source

pub fn intedg_iter(&self) -> impl Iterator<Item = &Intedg>

Iterator for array of: 0x2680..0x26a0 - choose edge or level for interrupt

Source

pub fn intstata(&self, n: usize) -> &Intstata

0x2700..0x2720 - interrupt status for interrupt A

Source

pub fn intstata_iter(&self) -> impl Iterator<Item = &Intstata>

Iterator for array of: 0x2700..0x2720 - interrupt status for interrupt A

Source

pub fn intstatb(&self, n: usize) -> &Intstatb

0x2780..0x27a0 - interrupt status for interrupt B

Source

pub fn intstatb_iter(&self) -> impl Iterator<Item = &Intstatb>

Iterator for array of: 0x2780..0x27a0 - interrupt status for interrupt B

Trait Implementations§

Source§

impl Debug for Secgpio

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for Secgpio

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for Secgpio

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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>,

Source§

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.