Fork of mRotaryEncoder for mdeb-os. uses newer version of PinDetect. Testprogram: https://os.mbed.com/users/charly/code/mRotaryEncoder_HelloWorld-os/
Dependents: mRotaryEncoder_HelloWorld-os TMC2209-Test2
Diff: mRotaryEncoder.h
- Revision:
- 5:75ddffaf3721
- Parent:
- 3:39c2fc4482be
- Child:
- 6:854c349157b0
--- 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);