/// Non-blockingly "waits" until the count down finishes
///
/// # Contract
///
/// - If `Self: Periodic`, the timer will start a new count down right after the last one
/// finishes.
/// - Otherwise the behavior of calling `try_wait` after the last call returned `Ok` is UNSPECIFIED.
/// Implementers are suggested to panic on this scenario to signal a programmer error.
Non-blockingly "waits" until the count down finishes
Non - blockingly " waits " until the count down finishes
fn try_wait(&mut self) -> nb::Result<(), Self::Error> {
        if self.tmr.csr.read().tcf().is_tcf_1() {
            Ok(())
            // todo: start new timer?
        } else {
            Err(nb::Error::WouldBlock)
        }
    }
fn try_wait ( & mut self ) -> nb :: Result < ( ) , Self :: Error > { if self . tmr . csr . read ( ) . tcf ( ) . is_tcf_1 ( ) { Ok ( ( ) ) // todo: start new timer? } else { Err ( nb :: Error :: WouldBlock ) } }
Non-blockingly "waits" until the count down finishes
Non - blockingly " waits " until the count down finishes
&mut self
contract
If `Self: Periodic`, the timer will start a new count down right after the last one
finishes.
Otherwise the behavior of calling `try_wait` after the last call returned `Ok` is UNSPECIFIED.
Implementers are suggested to panic on this scenario to signal a programmer error.
If ` Self : Periodic ` the timer will start a new count down right after the last one finishes . Otherwise the behavior of calling ` try_wait ` after the last call returned ` Ok ` is UNSPECIFIED . Implementers are suggested to panic on this scenario to signal a programmer error .