test

Dependencies:   mbed TrapezoidControl QEI

Revision:
16:3f2c2d89372b
Parent:
4:ba9df71868df
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Input/Encoder/Encoder.cpp	Mon Jul 01 13:00:20 2019 +0000
@@ -0,0 +1,30 @@
+#include "Encoder.h"
+#include "mbed.h"
+
+#include "../../System/Process/InterruptProcess.h"
+
+InterruptIn BoardECD[] = {
+    InterruptIn(ECD_A_0),
+    InterruptIn(ECD_A_1),
+    InterruptIn(ECD_A_2),
+    InterruptIn(ECD_A_3),
+    
+    InterruptIn(ECD_B_0),
+    InterruptIn(ECD_B_1),
+    InterruptIn(ECD_B_2),
+    InterruptIn(ECD_B_3),
+};
+
+namespace ENCODER {
+    void ECD::Initialize() {
+        BoardECD[0].mode(PullUp);
+        BoardECD[1].mode(PullUp);
+        BoardECD[2].mode(PullUp);
+        BoardECD[3].mode(PullUp);
+
+        BoardECD[0].fall(int2);
+        BoardECD[1].fall(int3);
+        BoardECD[2].fall(int4);
+        BoardECD[3].fall(int5);
+    }
+}
\ No newline at end of file