[][src]Struct msp430fr2x5x_hal::watchdog::Wdt

pub struct Wdt<MODE> { /* fields omitted */ }

Watchdog timer which can be configured to watchdog or interval (timer) mode

Implementations

impl Wdt<WatchdogMode>[src]

pub fn constrain(wdt: WDT_A) -> Self[src]

Convert WDT peripheral into a watchdog timer (watchdog mode) and disable the watchdog. Set clock source to VLOCLK.

impl<MODE: WatchdogSelect> Wdt<MODE>[src]

pub fn set_aclk(&mut self, _clks: &Aclk) -> &mut Self[src]

Set watchdog clock source to ACLK and halt timer.

pub fn set_vloclk(&mut self) -> &mut Self[src]

Set watchdog clock source to VLOCLK and halt timer.

pub fn set_smclk(&mut self, _clks: &Smclk) -> &mut Self[src]

Set watchdog clock source to SMCLK and halt timer.

impl Wdt<WatchdogMode>[src]

pub fn to_interval(self) -> Wdt<IntervalMode>[src]

Convert to interval mode and pause timer

impl Wdt<IntervalMode>[src]

pub fn to_watchdog(self) -> Wdt<WatchdogMode>[src]

Convert to watchdog mode and pause timer

pub fn enable_interrupts(&mut self) -> &mut Self[src]

Enable interrupts for watchdog, which fires when the watchdog interrupt flag is set in interval mode. This setting does nothing in watchdog mode, but will carry over when switching to interval mode.

pub fn disable_interrupts(&mut self) -> &mut Self[src]

Disable interrupts for watchdog.

Trait Implementations

impl Cancel for Wdt<IntervalMode>[src]

type Error = Void

Error returned when a countdown can't be canceled.

pub fn cancel(&mut self) -> Result<(), Self::Error>[src]

This implementation will never return error even if watchdog has already been paused, hence the Void error type.

impl CountDown for Wdt<IntervalMode>[src]

type Time = WdtClkPeriods

The unit of time used by this timer

pub fn wait(&mut self) -> Result<(), Void>[src]

If called while timer is not running, this will always return WouldBlock.

impl Periodic for Wdt<IntervalMode>[src]

impl Watchdog for Wdt<WatchdogMode>[src]

impl WatchdogDisable for Wdt<WatchdogMode>[src]

impl WatchdogEnable for Wdt<WatchdogMode>[src]

type Time = WdtClkPeriods

Unit of time used by the watchdog

Auto Trait Implementations

impl<MODE> Send for Wdt<MODE> where
    MODE: Send
[src]

impl<MODE> !Sync for Wdt<MODE>[src]

impl<MODE> Unpin for Wdt<MODE> where
    MODE: Unpin
[src]

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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> 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.