Libary for Strpper motor controller, eg: Rep-Rap smart stick Catering for both, Phisical 'PIN' endstops, and PORT Expander end stops . ** BOTH IN TEST ** ** Phisical PIN tested (minimal) **** PORT PIN NOT TESTED ****

Revision:
0:a509cc91f7c2
Child:
1:66e95666c3b5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Stepper.h	Thu Jul 18 09:05:15 2013 +0000
@@ -0,0 +1,44 @@
+
+
+#ifndef _stepper_h_
+#define _stepper_h_
+
+#include "mbed.h"
+
+class Stepper {
+
+public:
+
+    Stepper(PinName Step, PinName Dir, PinName En, PinName Endstop_Left, PinName Endstop_Right, bool Invert_Dir, bool Invert_ESL, bool Invert_ESR);
+    
+    bool Pulse();
+    bool Set_Dir (bool Dir2Set);
+    bool ESL_Activeated();
+    bool ESR_Activeated();
+    bool ESL_Fitted();
+    bool ESR_Fitted();
+
+protected:
+    DigitalOut  _Step;    
+    DigitalOut  _Dir;
+    DigitalOut  _En;
+    
+    DigitalIn _Endstop_Left;    
+    DigitalIn _Endstop_Right;
+    
+    
+    bool _Invert_Dir;
+    bool _Invert_ESL;
+    bool _Invert_ESR;
+    bool _g4;
+    
+    bool ESL; 
+    
+private:
+       
+    int ESR; 
+    int Set; 
+    
+    };
+
+#endif // _stepper_h_
\ No newline at end of file