[][src]Struct lpc8xx_hal::swm::Handle

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

Handle to the SWM peripheral

Can be used to enable and disable the switch matrix. It is also required by other parts of the API to synchronize access the the underlying registers, wherever this is required.

Please refer to the module documentation for more information about the PMU.

Methods

impl Handle<Disabled>[src]

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

Enable the switch matrix

This method is only available, if SWM 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 SWM and returns another instance that has its State type parameter set to Enabled.

impl Handle<Enabled>[src]

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

Disable the switch matrix

This method is only available, if SWM 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 SWM and returns another instance that has its State type parameter set to Disabled.

Auto Trait Implementations

impl<State> Unpin for Handle<State> where
    State: Unpin

impl<State> Send for Handle<State> where
    State: Send

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

Blanket Implementations

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self