pub struct Wdt<TG> { /* private fields */ }Expand description
Watchdog timer
Implementations§
Source§impl<TG> Wdt<TG>where
TG: TimerGroupInstance,
Watchdog driver
impl<TG> Wdt<TG>where
TG: TimerGroupInstance,
Watchdog driver
Sourcepub unsafe fn set_wdt_enabled(&mut self, enabled: bool)
pub unsafe fn set_wdt_enabled(&mut self, 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.
Sourcepub fn set_timeout(&mut self, stage: MwdtStage, timeout: Duration)
pub fn set_timeout(&mut self, stage: MwdtStage, timeout: Duration)
Set the timeout, in microseconds, of the watchdog timer
Sourcepub fn set_stage_action(&mut self, stage: MwdtStage, action: MwdtStageAction)
pub fn set_stage_action(&mut self, stage: MwdtStage, action: MwdtStageAction)
Set the stage action of the MWDT for a specific stage.
This function modifies MWDT behavior only if a custom bootloader with the following modifications is used:
ESP_TASK_WDT_ENparameter disabledESP_INT_WDTparameter disabled
Trait Implementations§
Source§impl<TG> Default for Wdt<TG>where
TG: TimerGroupInstance,
Available on crate feature unstable only.
impl<TG> Default for Wdt<TG>where
TG: TimerGroupInstance,
Available on crate feature
unstable only.Source§impl<TG> InterruptConfigurable for Wdt<TG>where
TG: TimerGroupInstance,
Available on crate feature unstable only.
impl<TG> InterruptConfigurable for Wdt<TG>where
TG: TimerGroupInstance,
Available on crate feature
unstable only.Source§fn set_interrupt_handler(&mut self, handler: InterruptHandler)
fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Registers an interrupt handler for the peripheral. Read more
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> UnsafeUnpin for Wdt<TG>
impl<TG> UnwindSafe for Wdt<TG>where
TG: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more