Struct stabilizer::hardware::input_stamper::InputStamper
source · pub struct InputStamper { /* private fields */ }
Expand description
The timestamper for DI0 reference clock inputs.
Implementations§
source§impl InputStamper
impl InputStamper
sourcepub fn new(trigger: PA3<Alternate<2>>, timer_channel: Channel4) -> Self
pub fn new(trigger: PA3<Alternate<2>>, timer_channel: Channel4) -> Self
Construct the DI0 input timestamper.
§Args
trigger
- The capture trigger input pin.- `timer_channel - The timer channel used for capturing timestamps.
sourcepub fn latest_timestamp(&mut self) -> Result<Option<u32>, Option<u32>>
pub fn latest_timestamp(&mut self) -> Result<Option<u32>, Option<u32>>
Get the latest timestamp that has occurred.
§Note
This function must be called at least as often as timestamps arrive.
If an over-capture event occurs, this function will clear the overflow,
and return a new timestamp of unknown recency an Err()
.
Note that this indicates at least one timestamp was inadvertently dropped.
Auto Trait Implementations§
impl Freeze for InputStamper
impl RefUnwindSafe for InputStamper
impl Send for InputStamper
impl Sync for InputStamper
impl Unpin for InputStamper
impl UnwindSafe for InputStamper
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