pub struct Watchdog { /* private fields */ }Expand description
Watchdog peripheral
Implementations§
Source§impl Watchdog
impl Watchdog
Sourcepub fn enable_tick_generation(&mut self, cycles: u16)
pub fn enable_tick_generation(&mut self, cycles: u16)
Starts tick generation on all the ticks.
§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
§Arguments
pause- If true, watchdog timer will be paused
Sourcepub fn read_scratch(&self, reg: ScratchRegister) -> u32
pub fn read_scratch(&self, reg: ScratchRegister) -> u32
Read a scratch register
Sourcepub fn write_scratch(&mut self, reg: ScratchRegister, value: u32)
pub fn write_scratch(&mut self, reg: ScratchRegister, value: u32)
Write a scratch register
Sourcepub fn feed(&self)
pub fn feed(&self)
Set the watchdog counter back to its load value, making sure that the watchdog reboot will not be triggered for the configured period.
Sourcepub fn start<T>(&mut self, period: T)
pub fn start<T>(&mut self, period: T)
Start the watchdog. This enables a timer which will reboot the
rp2350 if Watchdog::feed() does not get called for the configured period.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Watchdog
impl RefUnwindSafe for Watchdog
impl Send for Watchdog
impl !Sync for Watchdog
impl Unpin for Watchdog
impl UnwindSafe for Watchdog
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
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more