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.

Implementors§

Source§

impl HardwareWatchdog<RpHalClock> for RpHalTaskWatchdog

Implement the HardwareWatchdog trait for the HAL watchdog.

Source§

impl HardwareWatchdog<EmbassyClock> for RpWatchdog

Implement the HardwareWatchdog trait for the RP2040/RP2350 watchdog.