pub enum Mode {
    CountTi2,
    CountTi1,
    Qei,
}
Expand description

Encoder mode. See TIMx_SMCR.SMS item in datasheet.

Variants

CountTi2

Encoder mode 1 - Counter counts up/down on TI2FP1 edge depending on TI1FP2 level.

CountTi1

Encoder mode 2 - Counter counts up/down on TI1FP2 edge depending on TI2FP1 level.

Qei

Encoder mode 3 (AKA quadrature mode) - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.