andysworkshop / stm32plus

The C++ library for the STM32 F0, F100, F103, F107 and F4 microcontrollers
http://www.andybrown.me.uk
Other
745 stars 224 forks source link

Encoder support for both edges #186

Closed mikepurvis closed 8 years ago

mikepurvis commented 8 years ago

stm32plus currently supports only rising or falling edge:

https://github.com/andysworkshop/stm32plus/blob/20d12f92ed92f2cbdd517de26e879014cec64baf/lib/include/timer/features/TimerEncoderFeature.h#L28-L31

But the underlying fwlib has an option for TIM_ICPolarity_BothEdge:

https://github.com/andysworkshop/stm32plus/blob/20d12f92ed92f2cbdd517de26e879014cec64baf/lib/fwlib/f4/stdperiph/inc/stm32f4xx_tim.h#L507-L509

mikepurvis commented 8 years ago

Woot, thanks!