[][src]Struct lpc82x_hal::gpio::GPIO

pub struct GPIO<State = Enabled> { /* fields omitted */ }

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<Disabled>[src]

pub fn enable(self, syscon: &mut Handle) -> GPIO<Enabled>[src]

Enable the GPIO peripheral

This method is only available, if GPIO is in the Disabled state. Code that attempts to call this method when the peripheral is already enabled will not compile.

Consumes this instance of GPIO and returns another instance that has its State type parameter set to Enabled.

impl GPIO<Enabled>[src]

pub fn disable(self, syscon: &mut Handle) -> GPIO<Disabled>[src]

Disable the GPIO peripheral

This method is only available, if GPIO is in the Enabled state. Code that attempts to call this method when the peripheral is already disabled will not compile.

Consumes this instance of GPIO and returns another instance that has its State type parameter set to Disabled.

impl<State> GPIO<State>[src]

pub fn free(self) -> GPIO_PORT[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> Send for GPIO<State> where
    State: Send

impl<State = Enabled<()>> !Sync for GPIO<State>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]