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)
Sets 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)
Sets the stage action of the MWDT for a specific stage.
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 on the current core. Read more