pub struct ConvChannel {
pub channel: Channel,
pub edge: Edge,
pub threshold: i16,
pub hysteresis: u16,
pub min_interval: u32,
}Expand description
一路 CONV 通道:把一路模拟输入当作转换时钟。
Fields§
§channel: Channel作为转换时钟的输入。
edge: Edge触发边沿。
threshold: i16阈值(ADC 码,−8192..=8191;±10 V 档下约 637 码/V,1400 码约 2.2 V,适合 TTL)。
hysteresis: u16迟滞(ADC 码,0..=8191,默认 200):信号过阈值后还要再走过这么多才确认一个边沿,抑制噪声造成的重复触发。
min_interval: u32两个边沿之间的最小间隔(采样周期数),0 = 不限制(默认)。
Implementations§
Source§impl ConvChannel
impl ConvChannel
Sourcepub fn hysteresis(self, codes: u16) -> ConvChannel
pub fn hysteresis(self, codes: u16) -> ConvChannel
修改迟滞。
Sourcepub fn min_interval(self, samples: u32) -> ConvChannel
pub fn min_interval(self, samples: u32) -> ConvChannel
修改最小间隔。
Trait Implementations§
Source§impl Clone for ConvChannel
impl Clone for ConvChannel
Source§fn clone(&self) -> ConvChannel
fn clone(&self) -> ConvChannel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConvChannel
impl Debug for ConvChannel
Source§impl PartialEq for ConvChannel
impl PartialEq for ConvChannel
impl Copy for ConvChannel
impl Eq for ConvChannel
impl StructuralPartialEq for ConvChannel
Auto Trait Implementations§
impl Freeze for ConvChannel
impl RefUnwindSafe for ConvChannel
impl Send for ConvChannel
impl Sync for ConvChannel
impl Unpin for ConvChannel
impl UnwindSafe for ConvChannel
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