Fork of original mRotaryEncoder library supporting more types of encoders (ones with full rise and fall cycle per one rotations).
Diff: mRotaryEncoder.h
- Revision:
- 5:75ddffaf3721
- Parent:
- 3:39c2fc4482be
- Child:
- 6:854c349157b0
diff -r 82be633acd05 -r 75ddffaf3721 mRotaryEncoder.h --- a/mRotaryEncoder.h Tue Feb 01 20:06:48 2011 +0000 +++ b/mRotaryEncoder.h Wed Feb 09 20:18:34 2011 +0000 @@ -33,6 +33,7 @@ * 09. Nov. 2010 * First version published Thomas Raab raabinator * 26.11.2010 extended by charly - pushbutton, pullmode, debounce, callback-system + * Feb2011 Changes InterruptIn to PinDetect which does the debounce of mechanical switches * */ class mRotaryEncoder { @@ -120,13 +121,13 @@ private: - InterruptIn *m_pinA; + PinDetect *m_pinA; DigitalIn *m_pinB; volatile int m_position; int m_debounceTime_us; - //InterruptIn *m_pinSW; + PinDetect *m_pinSW; void rise(void);