Using the Hardware Quadrature Encoder Channel on the DUE

the buffer is a better way but i am using my 5 volt encoders with a voltage divider on the output. just a 10k and 20k resistor in series. easier to stick in as an afterthought than wiring in the buffer.