pub struct Fwdgt { /* private fields */ }Expand description
The watchdog before it is started, the only state its period can be set in.
Implementations§
Source§impl Fwdgt
impl Fwdgt
Sourcepub fn start(self, psc: FwdgtPsc, rld: u16) -> FwdgtRunning
pub fn start(self, psc: FwdgtPsc, rld: u16) -> FwdgtRunning
Sets the period and starts counting down; there is no way back.
The timeout is (rld + 1) ticks of IRC40K / psc. Blocks while the
dividers reach the counter, which runs at 40 kHz.
§Panics
If rld exceeds 12 bits.
Sourcepub fn start_timeout<const NOM: u64, const DENOM: u64>(
self,
timeout: Duration<u32, NOM, DENOM>,
) -> FwdgtRunning
pub fn start_timeout<const NOM: u64, const DENOM: u64>( self, timeout: Duration<u32, NOM, DENOM>, ) -> FwdgtRunning
Same as start, but takes the period as a duration and
picks the dividers itself.
Any scale works with no conversion at the call site — 2.secs(),
500.millis(). Truncating, so the realised timeout is at most one tick
short of the request; anything past 26 s saturates there, and zero
becomes one tick.
Auto Trait Implementations§
impl !Sync for Fwdgt
impl Freeze for Fwdgt
impl RefUnwindSafe for Fwdgt
impl Send for Fwdgt
impl Unpin for Fwdgt
impl UnsafeUnpin for Fwdgt
impl UnwindSafe for Fwdgt
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