Struct stm32_metapac::gpio::Gpio
pub struct Gpio { /* private fields */ }
Expand description
General-purpose I/Os
Implementations§
§impl Gpio
impl Gpio
pub const unsafe fn from_ptr(ptr: *mut ()) -> Self
pub const fn as_ptr(&self) -> *mut ()
pub const fn afr(self, n: usize) -> Reg<Afr, RW>
pub const fn afr(self, n: usize) -> Reg<Afr, RW>
GPIO alternate function registers. The register described in the datasheet as AFRL is index 0 in this array, and AFRH is index 1. Note that when operating on AFRH, you need to subtract 8 from any operations on the field array it contains – the alternate function for pin 9 is at index 1, for instance.
Trait Implementations§
impl Copy for Gpio
impl Eq for Gpio
impl Send for Gpio
impl StructuralPartialEq for Gpio
impl Sync for Gpio
Auto Trait Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)