Struct esp_hal::timer::Wdt

source ·
pub struct Wdt<TG> { /* private fields */ }
Expand description

Watchdog timer

Implementations§

source§

impl<TG> Wdt<TG>

Watchdog driver

source

pub fn new() -> Self

Create a new watchdog timer instance

source

pub fn enable(&mut self)

Enable the watchdog timer instance

source

pub fn disable(&mut self)

Disable the watchdog timer instance

source

pub unsafe fn set_wdt_enabled(enabled: bool)

Forcibly enable or disable the watchdog timer

§Safety

This bypasses the usual ownership rules for the peripheral, so users must take care to ensure that no driver instance is active for the timer.

Trait Implementations§

source§

impl<TG> Default for Wdt<TG>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<TG> Watchdog for Wdt<TG>

source§

fn feed(&mut self)

Triggers the watchdog. This must be done once the watchdog is started to prevent the processor being reset.
source§

impl<TG> WatchdogDisable for Wdt<TG>

source§

fn disable(&mut self)

Disables the watchdog
source§

impl<TG> WatchdogEnable for Wdt<TG>

§

type Time = Duration<u64, 1, 1000000>

Unit of time used by the watchdog
source§

fn start<T>(&mut self, period: T)
where T: Into<Self::Time>,

Starts the watchdog with a given period, typically once this is done the watchdog needs to be kicked periodically or the processor is reset.

Auto Trait Implementations§

§

impl<TG> Freeze for Wdt<TG>

§

impl<TG> RefUnwindSafe for Wdt<TG>
where TG: RefUnwindSafe,

§

impl<TG> Send for Wdt<TG>
where TG: Send,

§

impl<TG> Sync for Wdt<TG>
where TG: Sync,

§

impl<TG> Unpin for Wdt<TG>
where TG: Unpin,

§

impl<TG> UnwindSafe for Wdt<TG>
where TG: UnwindSafe,

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>,

§

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>,

§

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.