1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
//! Interface for a watchdog timer.

pub trait Watchdog {
    /// Enable the watchdog timer. Period is the time in milliseconds
    /// the watchdog will timeout if not serviced.
    fn start(&self, period: usize);

    /// Disable the watchdog timer.
    fn stop(&self);

    /// Service the watchdog to let the hardware know the application
    /// is still executing.
    fn tickle(&self);
}