Basic library to interface a 2 channel quadrature encoder with mBed

Revision:
0:8e8c33a797a9
Child:
1:42d1e211e624
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QuadratureEncoder.h	Tue Jul 18 16:06:21 2017 +0000
@@ -0,0 +1,20 @@
+#ifndef _QUADRATUREENCODER_H_
+#define _QUADRATUREENCODER_H_
+
+#include "mbed.h"
+
+class QuadratureEncoder
+{
+public:
+    QuadratureEncoder(PinName pinA, PinName pinB);
+    int getTicks();
+
+private:
+    void _Bfalling();
+    void _Brising();
+    InterruptIn _channelB;
+    DigitalIn _channelA;
+    int _ticks;
+};
+
+#endif
\ No newline at end of file