pub trait CaptureOps<const C: u8>: ChannelEnable<C> {
// Required methods
fn apply_capture_mode(&mut self);
fn select_edge(&mut self, edge: Edge);
fn read_chxcv(&self) -> u16;
fn read_chxof(&self) -> bool;
fn clear_chxof(&mut self);
}Expand description
The input capture half of one channel, numbered by C like PwmOps.
Required Methods§
Sourcefn apply_capture_mode(&mut self)
fn apply_capture_mode(&mut self)
Points the channel at its pin and readies it to latch the counter.
Covers direction, input filter and capture prescaler at once: a channel still pointing at its comparator captures nothing.
Sourcefn select_edge(&mut self, edge: Edge)
fn select_edge(&mut self, edge: Edge)
Chooses the edge the channel takes its snapshot on.
Sourcefn read_chxcv(&self) -> u16
fn read_chxcv(&self) -> u16
Reads the counter value the last edge latched.
Says nothing about whether an edge arrived — the value means something
only once read_chxif confirms a capture.
Sourcefn read_chxof(&self) -> bool
fn read_chxof(&self) -> bool
Overcapture flag — set when an edge lands on a value not yet read.
Sourcefn clear_chxof(&mut self)
fn clear_chxof(&mut self)
Clears the overcapture flag.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".