[−][src]Struct lpc8xx_hal::gpio::GPIO
Interface to the GPIO peripheral
Controls the GPIO peripheral. Can be used to enable, disable, or free the
peripheral. For GPIO-functionality directly related to pins, please refer
to Pin
.
Use Peripherals
to gain access to an instance of this struct.
Please refer to the module documentation for more information.
Methods
impl GPIO<Enabled>
[src]
pub unsafe fn new_enabled(gpio: GPIO) -> Self
[src]
Create an enabled gpio peripheral
This method creates an GPIO
instance that it assumes is already in the
Enabled
state. It's up to the caller to verify this assumption.
impl GPIO<Disabled>
[src]
pub fn new(gpio: GPIO) -> Self
[src]
Create an disabled gpio peripheral
This method creates an GPIO
instance that it assumes is in the
Disabled
state. As it's only possible to enable a Disabled
GPIO
instance, it's also safe to pass an already Enabled
instance.
pub fn enable(self, syscon: &mut Handle) -> GPIO<Enabled>
[src]
impl GPIO<Enabled>
[src]
impl<State> GPIO<State>
[src]
pub fn free(self) -> GPIO
[src]
Return the raw peripheral
This method serves as an escape hatch from the HAL API. It returns the raw peripheral, allowing you to do whatever you want with it, without limitations imposed by the API.
If you are using this method because a feature you need is missing from the HAL API, please open an issue or, if an issue for your feature request already exists, comment on the existing issue, so we can prioritize it accordingly.
Auto Trait Implementations
impl<State> Unpin for GPIO<State> where
State: Unpin,
State: Unpin,
impl<State> Send for GPIO<State> where
State: Send,
State: Send,
impl<State = Enabled<()>> !Sync for GPIO<State>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self