GPIO

Struct GPIO 

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

Gerneral Purpose Input/Output

Implementations§

Source§

impl GPIO

Source

pub const PTR: *const RegisterBlock = {0x2000000 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 pb_cfg0(&self) -> &PB_CFG0

0x30 - PB Configure Register 0

Source

pub fn pb_cfg1(&self) -> &PB_CFG1

0x34 - PB Configure Register 1

Source

pub fn pb_dat(&self) -> &PB_DAT

0x40 - PB Data Register

Source

pub fn pb_drv0(&self) -> &PB_DRV0

0x44 - PB Multi_Driving Register 0

Source

pub fn pb_drv1(&self) -> &PB_DRV1

0x48 - PB Multi_Driving Register 1

Source

pub fn pb_pull0(&self) -> &PB_PULL0

0x54 - PB Pull Register 0

Source

pub fn pc_cfg0(&self) -> &PC_CFG0

0x60 - PC Configure Register 0

Source

pub fn pc_dat(&self) -> &PC_DAT

0x70 - PC Data Register

Source

pub fn pc_drv0(&self) -> &PC_DRV0

0x74 - PC Multi_Driving Register 0

Source

pub fn pc_pull0(&self) -> &PC_PULL0

0x84 - PC Pull Register 0

Source

pub fn pd_cfg0(&self) -> &PD_CFG0

0x90 - PD Configure Register 0

Source

pub fn pd_cfg1(&self) -> &PD_CFG1

0x94 - PD Configure Register 1

Source

pub fn pd_cfg2(&self) -> &PD_CFG2

0x98 - PD Configure Register 2

Source

pub fn pd_dat(&self) -> &PD_DAT

0xa0 - PD Data Register

Source

pub fn pd_drv0(&self) -> &PD_DRV0

0xa4 - PD Multi_Driving Register 0

Source

pub fn pd_drv1(&self) -> &PD_DRV1

0xa8 - PD Multi_Driving Register 1

Source

pub fn pd_drv2(&self) -> &PD_DRV2

0xac - PD Multi_Driving Register 2

Source

pub fn pd_pull0(&self) -> &PD_PULL0

0xb4 - PD Pull Register 0

Source

pub fn pd_pull1(&self) -> &PD_PULL1

0xb8 - PD Pull Register 1

Source

pub fn pe_cfg0(&self) -> &PE_CFG0

0xc0 - PE Configure Register 0

Source

pub fn pe_cfg1(&self) -> &PE_CFG1

0xc4 - PE Configure Register 1

Source

pub fn pe_cfg2(&self) -> &PE_CFG2

0xc8 - PE Configure Register 2

Source

pub fn pe_dat(&self) -> &PE_DAT

0xd0 - PE Data Register

Source

pub fn pe_drv0(&self) -> &PE_DRV0

0xd4 - PE Multi_Driving Register 0

Source

pub fn pe_drv1(&self) -> &PE_DRV1

0xd8 - PE Multi_Driving Register 1

Source

pub fn pe_drv2(&self) -> &PE_DRV2

0xdc - PE Multi_Driving Register 2

Source

pub fn pe_pull0(&self) -> &PE_PULL0

0xe4 - PE Pull Register 0

Source

pub fn pe_pull1(&self) -> &PE_PULL1

0xe8 - PE Pull Register 1

Source

pub fn pf_cfg0(&self) -> &PF_CFG0

0xf0 - PF Configure Register 0

Source

pub fn pf_dat(&self) -> &PF_DAT

0x100 - PF Data Register

Source

pub fn pf_drv0(&self) -> &PF_DRV0

0x104 - PF Multi_Driving Register 0

Source

pub fn pf_pull0(&self) -> &PF_PULL0

0x114 - PF Pull Register 0

Source

pub fn pg_cfg0(&self) -> &PG_CFG0

0x120 - PG Configure Register 0

Source

pub fn pg_cfg1(&self) -> &PG_CFG1

0x124 - PG Configure Register 1

Source

pub fn pg_cfg2(&self) -> &PG_CFG2

0x128 - PG Configure Register 2

Source

pub fn pg_dat(&self) -> &PG_DAT

0x130 - PG Data Register

Source

pub fn pg_drv0(&self) -> &PG_DRV0

0x134 - PG Multi_Driving Register 0

Source

pub fn pg_drv1(&self) -> &PG_DRV1

0x138 - PG Multi_Driving Register 1

Source

pub fn pg_drv2(&self) -> &PG_DRV2

0x13c - PG Multi_Driving Register 2

Source

pub fn pg_pull0(&self) -> &PG_PULL0

0x144 - PG Pull Register 0

Source

pub fn pg_pull1(&self) -> &PG_PULL1

0x148 - PG Pull Register 1

Source

pub fn pb_eint_cfg0(&self) -> &PB_EINT_CFG0

0x220 - PB External Interrupt Configure Register 0

Source

pub fn pb_eint_cfg1(&self) -> &PB_EINT_CFG1

0x224 - PB External Interrupt Configure Register 1

Source

pub fn pb_eint_ctl(&self) -> &PB_EINT_CTL

0x230 - PB External Interrupt Control Register

Source

pub fn pb_eint_status(&self) -> &PB_EINT_STATUS

0x234 - PB External Interrupt Status Register

Source

pub fn pb_eint_deb(&self) -> &PB_EINT_DEB

0x238 - PB External Interrupt Debounce Register

Source

pub fn pc_eint_cfg0(&self) -> &PC_EINT_CFG0

0x240 - PC External Interrupt Configure Register 0

Source

pub fn pc_eint_ctl(&self) -> &PC_EINT_CTL

0x250 - PC External Interrupt Control Register

Source

pub fn pc_eint_status(&self) -> &PC_EINT_STATUS

0x254 - PC External Interrupt Status Register

Source

pub fn pc_eint_deb(&self) -> &PC_EINT_DEB

0x258 - PC External Interrupt Debounce Register

Source

pub fn pd_eint_cfg0(&self) -> &PD_EINT_CFG0

0x260 - PD External Interrupt Configure Register 0

Source

pub fn pd_eint_cfg1(&self) -> &PD_EINT_CFG1

0x264 - PD External Interrupt Configure Register 1

Source

pub fn pd_eint_cfg2(&self) -> &PD_EINT_CFG2

0x268 - PD External Interrupt Configure Register 2

Source

pub fn pd_eint_ctl(&self) -> &PD_EINT_CTL

0x270 - PD External Interrupt Control Register

Source

pub fn pd_eint_status(&self) -> &PD_EINT_STATUS

0x274 - PD External Interrupt Status Register

Source

pub fn pd_eint_deb(&self) -> &PD_EINT_DEB

0x278 - PD External Interrupt Debounce Register

Source

pub fn pe_eint_cfg0(&self) -> &PE_EINT_CFG0

0x280 - PE External Interrupt Configure Register 0

Source

pub fn pe_eint_cfg1(&self) -> &PE_EINT_CFG1

0x284 - PE External Interrupt Configure Register 1

Source

pub fn pe_eint_cfg2(&self) -> &PE_EINT_CFG2

0x288 - PE External Interrupt Configure Register 2

Source

pub fn pe_eint_ctl(&self) -> &PE_EINT_CTL

0x290 - PE External Interrupt Control Register

Source

pub fn pe_eint_status(&self) -> &PE_EINT_STATUS

0x294 - PE External Interrupt Status Register

Source

pub fn pe_eint_deb(&self) -> &PE_EINT_DEB

0x298 - PE External Interrupt Debounce Register

Source

pub fn pf_eint_cfg0(&self) -> &PF_EINT_CFG0

0x2a0 - PF External Interrupt Configure Register 0

Source

pub fn pf_eint_ctl(&self) -> &PF_EINT_CTL

0x2b0 - PF External Interrupt Control Register

Source

pub fn pf_eint_status(&self) -> &PF_EINT_STATUS

0x2b4 - PF External Interrupt Status Register

Source

pub fn pf_eint_deb(&self) -> &PF_EINT_DEB

0x2b8 - PF External Interrupt Debounce Register

Source

pub fn pg_eint_cfg0(&self) -> &PG_EINT_CFG0

0x2c0 - PG External Interrupt Configure Register 0

Source

pub fn pg_eint_cfg1(&self) -> &PG_EINT_CFG1

0x2c4 - PG External Interrupt Configure Register 1

Source

pub fn pg_eint_cfg2(&self) -> &PG_EINT_CFG2

0x2c8 - PG External Interrupt Configure Register 2

Source

pub fn pg_eint_ctl(&self) -> &PG_EINT_CTL

0x2d0 - PG External Interrupt Control Register

Source

pub fn pg_eint_status(&self) -> &PG_EINT_STATUS

0x2d4 - PG External Interrupt Status Register

Source

pub fn pg_eint_deb(&self) -> &PG_EINT_DEB

0x2d8 - PG External Interrupt Debounce Register

Source

pub fn pio_pow_mod_sel(&self) -> &PIO_POW_MOD_SEL

0x340 - PIO Group Withstand Voltage Mode Select Register

Source

pub fn pio_pow_ms_ctl(&self) -> &PIO_POW_MS_CTL

0x344 - PIO Group Withstand Voltage Mode Select Control Register

Source

pub fn pio_pow_val(&self) -> &PIO_POW_VAL

0x348 - PIO Group Power Value Register

Source

pub fn pio_pow_vol_sel_ctl(&self) -> &PIO_POW_VOL_SEL_CTL

0x350 - PIO Group Power Voltage Select Control Register

Trait Implementations§

Source§

impl Debug for GPIO

Source§

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

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

impl Deref for GPIO

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl Send for GPIO

Auto Trait Implementations§

§

impl Freeze for GPIO

§

impl RefUnwindSafe for GPIO

§

impl !Sync for GPIO

§

impl Unpin for GPIO

§

impl UnwindSafe for GPIO

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.