Quadrature encoder interface library.

Dependents:   PreHeater-Rev2

Fork of QEI by Aaron Berk

Revision:
1:aea205976bf8
Parent:
0:5c2ad81551aa
Child:
2:d811f926cf4a
--- a/QEI.cpp	Thu Sep 02 16:48:55 2010 +0000
+++ b/QEI.cpp	Tue Jul 28 18:57:19 2015 +0000
@@ -131,15 +131,18 @@
 QEI::QEI(PinName channelA,
          PinName channelB,
          PinName index,
+         PinMode intRes,
          int pulsesPerRev,
          Encoding encoding) : channelA_(channelA), channelB_(channelB),
         index_(index) {
 
+
     pulses_       = 0;
     revolutions_  = 0;
     pulsesPerRev_ = pulsesPerRev;
     encoding_     = encoding;
-
+channelA_.mode(intRes);
+channelB_.mode(intRes);
     //Workout what the current state is.
     int chanA = channelA_.read();
     int chanB = channelB_.read();