Skip to main content

HardwareWatchdog

Trait HardwareWatchdog 

Source
pub trait HardwareWatchdog<C: Clock> {
    // Required methods
    fn start(&mut self, timeout: C::Duration);
    fn feed(&mut self);
    fn trigger_reset(&mut self) -> !;
    fn reset_reason(&self) -> Option<ResetReason>;
}
Expand description

Represents a hardware-level watchdog that can be fed and reset the system.

Required Methods§

Source

fn start(&mut self, timeout: C::Duration)

Start the hardware watchdog with the given timeout.

Source

fn feed(&mut self)

Feed the hardware watchdog to prevent a system reset.

Source

fn trigger_reset(&mut self) -> !

Trigger a hardware reset.

Source

fn reset_reason(&self) -> Option<ResetReason>

Get the reason for the last reset, if available.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl HardwareWatchdog<EmbassyClock> for RpWatchdog

Implement the HardwareWatchdog trait for the RP2040/RP2350 watchdog.

Source§

impl HardwareWatchdog<RpHalClock> for RpHalTaskWatchdog

Implement the HardwareWatchdog trait for the HAL watchdog.