pub struct ConvSource {
pub channel: Channel,
pub group: Option<u8>,
pub rising: bool,
pub falling: bool,
pub threshold: i32,
pub hysteresis: u32,
}Expand description
用作 CONV 来源的一路输入(AT+CONV?、AT+CONVADD)。
Fields§
§channel: Channel输入。
group: Option<u8>所属的组(0 或 1);None 表示检测器已启用但不在任何组里。
rising: bool上升沿有效。
falling: bool下降沿有效。
threshold: i32阈值(ADC 码)。
hysteresis: u32迟滞(ADC 码)。
Implementations§
Source§impl ConvSource
impl ConvSource
Sourcepub fn new(channel: Channel) -> ConvSource
pub fn new(channel: Channel) -> ConvSource
组 0、上升沿、阈值 1400 码(±10 V 档下约 2.2 V,适合 TTL)、迟滞 200 码——与 AT+CONV= 的默认值相同。
Trait Implementations§
Source§impl Clone for ConvSource
impl Clone for ConvSource
Source§fn clone(&self) -> ConvSource
fn clone(&self) -> ConvSource
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 ConvSource
impl Debug for ConvSource
Source§impl PartialEq for ConvSource
impl PartialEq for ConvSource
impl Copy for ConvSource
impl Eq for ConvSource
impl StructuralPartialEq for ConvSource
Auto Trait Implementations§
impl Freeze for ConvSource
impl RefUnwindSafe for ConvSource
impl Send for ConvSource
impl Sync for ConvSource
impl Unpin for ConvSource
impl UnwindSafe for ConvSource
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