pub struct Gpio2 { /* private fields */ }Expand description
General Purpose Input/Output 2
Implementations§
source§impl Gpio2
impl Gpio2
sourcepub const PTR: *const RegisterBlock = {0xff780000 as *const gpio::RegisterBlock}
pub const PTR: *const RegisterBlock = {0xff780000 as *const gpio::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
sourcepub unsafe fn steal() -> Self
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>§
sourcepub fn gpio_swporta_dr(&self) -> &GpioSwportaDr
pub fn gpio_swporta_dr(&self) -> &GpioSwportaDr
0x00 - Port A data register
sourcepub fn gpio_swporta_ddr(&self) -> &GpioSwportaDdr
pub fn gpio_swporta_ddr(&self) -> &GpioSwportaDdr
0x04 - Port A data direction register
sourcepub fn gpio_inten(&self) -> &GpioInten
pub fn gpio_inten(&self) -> &GpioInten
0x30 - Interrupt enable register
sourcepub fn gpio_intmask(&self) -> &GpioIntmask
pub fn gpio_intmask(&self) -> &GpioIntmask
0x34 - Interrupt mask register
sourcepub fn gpio_inttype_level(&self) -> &GpioInttypeLevel
pub fn gpio_inttype_level(&self) -> &GpioInttypeLevel
0x38 - Interrupt level register
sourcepub fn gpio_int_polarity(&self) -> &GpioIntPolarity
pub fn gpio_int_polarity(&self) -> &GpioIntPolarity
0x3c - Interrupt polarity register
sourcepub fn gpio_int_status(&self) -> &GpioIntStatus
pub fn gpio_int_status(&self) -> &GpioIntStatus
0x40 - Interrupt status of port A
sourcepub fn gpio_int_rawstatus(&self) -> &GpioIntRawstatus
pub fn gpio_int_rawstatus(&self) -> &GpioIntRawstatus
0x44 - Raw Interrupt status of port A
sourcepub fn gpio_debounce(&self) -> &GpioDebounce
pub fn gpio_debounce(&self) -> &GpioDebounce
0x48 - Debounce enable register
sourcepub fn gpio_porta_eoi(&self) -> &GpioPortaEoi
pub fn gpio_porta_eoi(&self) -> &GpioPortaEoi
0x4c - Port A clear interrupt register
sourcepub fn gpio_ext_porta(&self) -> &GpioExtPorta
pub fn gpio_ext_porta(&self) -> &GpioExtPorta
0x50 - Port A external port register
sourcepub fn gpio_ls_sync(&self) -> &GpioLsSync
pub fn gpio_ls_sync(&self) -> &GpioLsSync
0x60 - Level_sensitive synchronization enable register