Senior design sensored code to run freescale motor with IM07M1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
BVanderWilp
Date:
Wed Apr 13 15:41:49 2016 +0000
Parent:
7:9d90184335aa
Commit message:
changed interrupt names to switch to smoother motor config

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 9d90184335aa -r 2f5dc29f9bb1 main.cpp
--- a/main.cpp	Mon Apr 11 19:53:55 2016 +0000
+++ b/main.cpp	Wed Apr 13 15:41:49 2016 +0000
@@ -37,8 +37,8 @@
     revCount = 0;
     rpmPrintFlag = 1;
 }
-
-void Crise()    //state1, A0 B- C+
+//to switch to old motor config, change letter of interrupts. old:ABC, new:BCA
+void Arise()    //state1, A0 B- C+
 {   
     phaseAEN = 0;
     phaseBEN = 1;
@@ -49,7 +49,7 @@
     revCount++;
 }
 
-void Bfall()    //state2, A+ B- C0
+void Cfall()    //state2, A+ B- C0
 {
     phaseCEN = 0;
     phaseC.write(0);
@@ -59,7 +59,7 @@
     phaseBEN = 1;
 }
 
-void Arise()    //state3, A+ B0 C-
+void Brise()    //state3, A+ B0 C-
 {
     phaseBEN = 0;
     phaseCEN = 1;
@@ -68,7 +68,7 @@
     phaseAEN = 1;
 }
 
-void Cfall()    //state4, A0 B+ C-
+void Afall()    //state4, A0 B+ C-
 {
     phaseAEN = 0;
     phaseA.write(0);
@@ -79,7 +79,7 @@
 //    redLed = ! redLed;
 }
 
-void Brise()    //state5, A- B+ C0
+void Crise()    //state5, A- B+ C0
 {
     phaseCEN = 0;
     phaseAEN = 1;
@@ -88,7 +88,7 @@
     phaseBEN = 1;
 }
 
-void Afall()    //state6, A- B0 C+
+void Bfall()    //state6, A- B0 C+
 {
     phaseBEN = 0;
     phaseB.write(0);