Enum CntCfg

Source
pub enum CntCfg {
    Cnt1Bit24(CntSetup),
    Cnt2Bit24(CntSetup, CntSetup),
    Cnt1Bit48(CntSetup),
    Cnt1Bit16(CntSetup),
    Cnt1Bit32(CntSetup),
    Cnt2Bit32Bit16(CntSetup, CntSetup),
    Cnt2Bit16(CntSetup, CntSetup),
    Cnt3Bit16(CntSetup, CntSetup, CntSetup),
}
Expand description

Counter configuration

The iC-MD can be configured for 1 up to 3 channels with counter lengths of 16 to 48 bits. Each counter can furthermore be specified to count in clockwise or counterclockwise direction. Finally, you can also configure if the Z signal is normal or inverted. For the setup with three counters, the Z signal setup will simply be ignored as there are no connections for Z signals available. See datasheet for more information.

If you enable the defmt feature, this enum will contain a defmt::Format implementation for logging the current configuration.

Variants§

§

Cnt1Bit24(CntSetup)

Counter 0 = 24 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt2Bit24(CntSetup, CntSetup)

Counter 0 = 24 bit and Counter 1 = 24 bit; 2 counters; TTL only

§

Cnt1Bit48(CntSetup)

Counter 0 = 48 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt1Bit16(CntSetup)

Counter 0 = 16 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt1Bit32(CntSetup)

Counter 0 = 32 bit; 1 counter; TTL, RS422, or LVDS

§

Cnt2Bit32Bit16(CntSetup, CntSetup)

Counter 0 = 32 bit and Counter 1 = 16 bit; 2 counters; TTL only

§

Cnt2Bit16(CntSetup, CntSetup)

Counter 0 = 16 bit and Counter 1 = 16 bit; 2 counters; TTL only

§

Cnt3Bit16(CntSetup, CntSetup, CntSetup)

Counter 0 = 16 bit, Counter 1 = 16 bit, and Counter 2 = 16 bit; 3 counters; TTL only

Trait Implementations§

Source§

impl Clone for CntCfg

Source§

fn clone(&self) -> CntCfg

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CntCfg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<CntCfg> for u8

Source§

fn from(val: CntCfg) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for CntCfg

Source§

fn eq(&self, other: &CntCfg) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for CntCfg

Source§

impl Eq for CntCfg

Source§

impl StructuralPartialEq for CntCfg

Auto Trait Implementations§

§

impl Freeze for CntCfg

§

impl RefUnwindSafe for CntCfg

§

impl Send for CntCfg

§

impl Sync for CntCfg

§

impl Unpin for CntCfg

§

impl UnwindSafe for CntCfg

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.