pub struct Watchdog<'d> { /* private fields */ }Expand description
Watchdog peripheral
Implementations§
Source§impl<'d> Watchdog<'d>
impl<'d> Watchdog<'d>
Sourcepub fn enable_tick_generation(&mut self, cycles: u8)
pub fn enable_tick_generation(&mut self, cycles: u8)
Start tick generation on clk_tick which is driven from clk_ref.
§Arguments
cycles- Total number of tick cycles before the next tick is generated. It is expected to be the frequency in MHz of clk_ref.
Sourcepub fn pause_on_debug(&mut self, pause: bool)
pub fn pause_on_debug(&mut self, pause: bool)
Defines whether or not the watchdog timer should be paused when processor(s) are in debug mode or when JTAG is accessing bus fabric
Sourcepub fn trigger_reset(&mut self)
pub fn trigger_reset(&mut self)
Trigger a system reset
Sourcepub fn set_scratch(&mut self, index: usize, value: u32)
pub fn set_scratch(&mut self, index: usize, value: u32)
Store data in scratch register
Sourcepub fn reset_reason(&self) -> Option<ResetReason>
pub fn reset_reason(&self) -> Option<ResetReason>
Get the reason for the last system reset, if it was caused by the watchdog.
Auto Trait Implementations§
impl<'d> !UnwindSafe for Watchdog<'d>
impl<'d> Freeze for Watchdog<'d>
impl<'d> RefUnwindSafe for Watchdog<'d>
impl<'d> Send for Watchdog<'d>
impl<'d> Sync for Watchdog<'d>
impl<'d> Unpin for Watchdog<'d>
impl<'d> UnsafeUnpin for Watchdog<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more