modm API documentation
Quadrature Encoder Input using STM32 general purpose Timer

Functions

template<class Timer , typename SignalA , typename SignalB , uint16_t PRESCALER = 4, std::signed_integral DeltaType = int16_t>
 modm::requires (std::numeric_limits< DeltaType >::max ()< std::pow (2, 31)) class EncoderInput
 Gray code decoder using STM32 Timer mode. More...
 

Detailed Description

lbuild module: modm:driver:encoder_input

This driver decodes an AB (incremental) encoder signal.

Function Documentation

template<class Timer , typename SignalA , typename SignalB , uint16_t PRESCALER = 4, std::signed_integral DeltaType = int16_t>
modm::requires ( )

Gray code decoder using STM32 Timer mode.

Template Parameters
TimerSTM32 General purpose timer
SignalAFirst modm::platform::Gpio pin that connects to Timer::Ch1
SignalBSecond modm::platform::Gpio pin that connects to Timer::Ch2
PRESCALERHow many encoder pulses to count as one
DeltaTypeFor very fast or high resolution encoder, int32_t may be required