102 #if IS_USED(MODULE_INC_ENCODER_HARDWARE) || DOXYGEN
104 #elif IS_USED(MODULE_INC_ENCODER_SOFTWARE) || DOXYGEN
115 #if IS_USED(MODULE_INC_ENCODER_SOFTWARE) || DOXYGEN
121 #elif IS_USED(MODULE_INC_ENCODER_HARDWARE) || DOXYGEN
122 int32_t extended_count;
124 int32_t leftover_count;
Low-level GPIO peripheral driver interface definitions.
int inc_encoder_init(inc_encoder_t *dev, const inc_encoder_params_t *params)
Initialize the given device.
int inc_encoder_read_rpm(inc_encoder_t *dev, int32_t *rpm)
Read the current RPM of the motor.
int inc_encoder_read_reset_milli_revs(inc_encoder_t *dev, int32_t *rev_counter)
Read and reset number of revolutions since the last readout in thousands of a full revolution.
uint_fast8_t qdec_t
Default QDEC type definition.
Common macros and compiler attributes/pragmas configuration.
Low-level QDEC peripheral driver interface definitions.
Device initialization parameters.
qdec_t qdec_dev
QDEC device used for hardware decoding.
Device descriptor for the driver.
uint32_t delta_t
time delta since the last pulse
inc_encoder_params_t params
configuration parameters
bool cw
clock wise rotation
bool stale
indicates that there is no new data to be read
int32_t pulse_counter
number of pulses since last read
uint32_t last_read_time
time of the last read
ztimer periodic structure