pub struct Wdt<TG> { /* private fields */ }
Available on crate feature
unstable
only.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_EN
parameter disabledESP_INT_WDT
parameter disabled
Trait Implementations§
Source§impl<TG> InterruptConfigurable for Wdt<TG>where
TG: TimerGroupInstance,
impl<TG> InterruptConfigurable for Wdt<TG>where
TG: TimerGroupInstance,
Source§fn set_interrupt_handler(&mut self, handler: InterruptHandler)
fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Registers an interrupt handler for the peripheral on the current core. Read more