Hi,
I recently acquired a 400 P/R rotary encoder pulse counter
http://www.robotshop.com/en/pulse-count-module.html
which uses LFLS7366R for 32-BIT QUADRATURE COUNTER WITH SPI SERIAL INTERFACE
Since I could not find any C++ code talking to the LS7336 chip I wrote a small class
allowing to set MDR0, MDR1 registers of LS7336 and read the encoder position w/o
affecting incrementation of internal CNTR counter in LS7336. It uses WiringPi library for the low level SPI protocol.
The code is available in Bitbucket at:
https://bitbucket.org/balewski/malina/s ... ?at=master
Perhaps you find it useful for your projects
Thanks
Jan