Handle

Struct Handle 

Source
pub struct Handle { /* private fields */ }
Expand description

Handle to the SYSCON peripheral

This handle to the SYSCON peripheral provides access to the main part of the SYSCON API. It is also required by other parts of the HAL API to synchronize access the the underlying registers, wherever this is required.

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

Implementations§

Source§

impl Handle

Source

pub fn enable_clock<P: ClockControl>(&mut self, peripheral: &P)

Enable peripheral clock

Enables the clock for a peripheral or other hardware component. HAL users usually won’t have to call this method directly, as other peripheral APIs will do this for them.

Source

pub fn disable_clock<P: ClockControl>(&mut self, peripheral: &P)

Disable peripheral clock

Source

pub fn assert_reset<P: ResetControl>(&mut self, peripheral: &P)

Assert peripheral reset

Source

pub fn clear_reset<P: ResetControl>(&mut self, peripheral: &P)

Clear peripheral reset

Clears the reset for a peripheral or other hardware component. HAL users usually won’t have to call this method directly, as other peripheral APIs will do this for them.

Source

pub fn power_up<P: AnalogBlock>(&mut self, peripheral: &P)

Provide power to an analog block

HAL users usually won’t have to call this method themselves, as other peripheral APIs will do this for them.

Source

pub fn power_down<P: AnalogBlock>(&mut self, peripheral: &P)

Remove power from an analog block

Source

pub fn enable_interrupt_wakeup<I>(&mut self)
where I: WakeUpInterrupt,

Enable interrupt wake-up from deep-sleep and power-down modes

To use an interrupt for waking up the system from the deep-sleep and power-down modes, it needs to be enabled using this method, in addition to being enabled in the NVIC.

This method is not required when using the regular sleep mode.

Source

pub fn disable_interrupt_wakeup<I>(&mut self)
where I: WakeUpInterrupt,

Disable interrupt wake-up from deep-sleep and power-down modes

Auto Trait Implementations§

§

impl Freeze for Handle

§

impl !RefUnwindSafe for Handle

§

impl Send for Handle

§

impl !Sync for Handle

§

impl Unpin for Handle

§

impl !UnwindSafe for Handle

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.