[][src]Struct lpc82x_hal::wkt::WKT

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

Interface to the self-wake-up timer (WKT)

Controls the WKT. Use Peripherals to gain access to an instance of this struct.

Please refer to the module documentation for more information.

Methods

impl WKT<Disabled>[src]

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

Enable the WKT

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

impl WKT<Enabled>[src]

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

Disable the WKT

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

pub fn select_clock<C>(&mut self) where
    C: Clock
[src]

Select the clock that runs the self-wake-up timer

This method is only available if the WKT is enabled. Code attempting to call this method when this is not the case will not compile.

All clocks that can run the WKT implement a common trait. Please refer to wkt::Clock for a list of clocks that can be passed to this method. Selecting an external clock via the WKTCLKIN pin is currently not supported.

Limitations

Currently, nothing prevents the user from selecting a clock that is disabled, attempting to start the timer while the clock is disabled, or disabling the clock while the timer is running.

impl<State> WKT<State>[src]

pub fn free(self) -> WKT[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.

Trait Implementations

impl CountDown for WKT<Enabled>[src]

type Time = u32

The unit of time used by this timer

Auto Trait Implementations

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

impl<State = Enabled<()>> !Sync for WKT<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]