102 #if IS_USED(MODULE_INC_ENCODER_HARDWARE)
104 #elif IS_USED(MODULE_INC_ENCODER_SOFTWARE)
115 #if IS_USED(MODULE_INC_ENCODER_SOFTWARE)
117 int32_t pulse_counter;
118 uint32_t last_read_time;
121 #elif IS_USED(MODULE_INC_ENCODER_HARDWARE)
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.
Device descriptor for the driver.
inc_encoder_params_t params
configuration parameters
ztimer periodic structure