pub struct EPPinToggle<E, P>where
P: OutputPin<Error = E>,{ /* private fields */ }
Expand description
Implements EmbeddedProfiler
by toggling the given pin.
Implementations§
Source§impl<E, P> EPPinToggle<E, P>where
P: OutputPin<Error = E>,
impl<E, P> EPPinToggle<E, P>where
P: OutputPin<Error = E>,
Sourcepub const fn new(pin: P) -> Self
pub const fn new(pin: P) -> Self
Creates a new EPPinToggle
with the given pin
.
Sourcepub fn free(self) -> P
pub fn free(self) -> P
Consumes EPPinToggle
, returning the pin
.
Trait Implementations§
Source§impl<E, P> EmbeddedProfiler for EPPinToggle<E, P>where
P: OutputPin<Error = E>,
impl<E, P> EmbeddedProfiler for EPPinToggle<E, P>where
P: OutputPin<Error = E>,
Source§fn read_clock(&self) -> EPInstant
fn read_clock(&self) -> EPInstant
Takes a reading from the clock. Read more
Source§fn at_start(&self)
fn at_start(&self)
Optional function that gets called at the start of the snapshot recording. Read more
Source§fn log_snapshot(&self, _snapshot: &EPSnapshot)
fn log_snapshot(&self, _snapshot: &EPSnapshot)
Optionally log the snapshot to some output, like a serial port.
Source§fn start_snapshot(&self) -> Instant<u32, 1, 1000000>
fn start_snapshot(&self) -> Instant<u32, 1, 1000000>
takes the starting snapshot of a specific trace. Read more
Source§fn end_snapshot(
&self,
start: Instant<u32, 1, 1000000>,
name: &'static str,
) -> Option<EPSnapshot>
fn end_snapshot( &self, start: Instant<u32, 1, 1000000>, name: &'static str, ) -> Option<EPSnapshot>
computes the duration of the snapshot given the start time, if there hasn’t been overflow.
Auto Trait Implementations§
impl<E, P> !Freeze for EPPinToggle<E, P>
impl<E, P> !RefUnwindSafe for EPPinToggle<E, P>
impl<E, P> Send for EPPinToggle<E, P>where
P: Send,
impl<E, P> !Sync for EPPinToggle<E, P>
impl<E, P> Unpin for EPPinToggle<E, P>where
P: Unpin,
impl<E, P> UnwindSafe for EPPinToggle<E, P>where
P: UnwindSafe,
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