aa

Dependencies:   mbed TrapezoidControl QEI

Revision:
1:b1219d8ca117
Child:
4:ba9df71868df
Child:
5:3ae504b88679
diff -r 669ef71cba68 -r b1219d8ca117 Input/Rotaryencoder/Rotaryencoder.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Input/Rotaryencoder/Rotaryencoder.cpp	Mon Sep 10 01:39:15 2018 +0000
@@ -0,0 +1,26 @@
+#include "Rotaryencoder.h"
+#include "mbed.h"
+
+#include "../../System/Process/InterruptProcess.h"
+
+InterruptIn BoardRtInt[] = {
+    InterruptIn(RT11_PIN),
+    InterruptIn(RT12_PIN),
+    
+    InterruptIn(RT21_PIN),
+    InterruptIn(RT22_PIN),
+};
+
+namespace ROTARYENCODER {
+    void Int::Initialize() {
+        BoardRtInt[0].mode(PullUp);
+        BoardRtInt[1].mode(PullUp);
+        BoardRtInt[2].mode(PullUp);
+        BoardRtInt[3].mode(PullUp);
+
+        BoardRtInt[0].fall(int0);
+        BoardRtInt[1].fall(int1);
+        BoardRtInt[2].fall(int2);
+        BoardRtInt[3].fall(int3);
+    }
+}
\ No newline at end of file