14 #include <HardwareTimer.h>
40 STM32Encoder (TIM_TypeDef* timer, uint8_t pin1, uint8_t pin2);
Class which operates an STM32 timer in quadrature encoder mode.
Definition: encoder_counter.h:35
void pause(void)
Pause the counter so it won't update its count until resumed.
Definition: encoder_counter.h:59
HardwareTimer * p_timer
Pointer to the timer/counter to be used.
Definition: encoder_counter.h:37
void resume(void)
Resume the counter so it will update its count when the encoder is moved.
Definition: encoder_counter.h:67
uint32_t getCount(void)
Return the current position count from the timer.
Definition: encoder_counter.h:45
STM32Encoder(TIM_TypeDef *timer, uint8_t pin1, uint8_t pin2)
Set up an STM32 timer to read a quadrature encoder.
Definition: encoder_counter.cpp:44
void zero(void)
Set the counter reading to zero.
Definition: encoder_counter.h:52