pub struct Handle<State = Enabled> { /* private fields */ }
Expand description

Handle to the SWM peripheral

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

This struct is part of swm::Parts.

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

Implementations

Enable the switch matrix

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

Disable the switch matrix

The switch matrix retains it’s configuration while disabled, but doesn’t allow modifications

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.