motor control
Fork of X_NUCLEO_IHM01A1 by
Diff: Components/Interfaces/StepperMotor_class.h
- Revision:
- 5:d3c78f12a78d
- Parent:
- 4:83a1eb397a65
- Child:
- 7:f7e0c3621f77
--- a/Components/Interfaces/StepperMotor_class.h Fri Nov 13 12:56:06 2015 +0000 +++ b/Components/Interfaces/StepperMotor_class.h Wed Nov 18 18:41:55 2015 +0000 @@ -58,8 +58,8 @@ /** Rotation modes. */ typedef enum { - CW = 0, /* Clockwise. */ - CCW /* Counter-Clockwise. */ + BWD = 0, /* Backward. */ + FWD = 1 /* Forward. */ } direction_t; /* Get the status. */ @@ -74,9 +74,6 @@ /* Return the mark position. */ virtual signed int GetMark(void) = 0; - /* Get the current direction of rotation. */ - virtual direction_t GetDirection(void) = 0; - /* Return the current speed in pps. */ virtual unsigned int GetSpeed(void) = 0; @@ -92,6 +89,9 @@ /* Return the deceleration in pps^2. */ virtual unsigned int GetDeceleration(void) = 0; + /* Get the current direction of rotation. */ + virtual direction_t GetDirection(void) = 0; + /* Set the specified parameter. */ virtual void SetParameter(unsigned int parameter, unsigned int value) = 0; @@ -101,9 +101,6 @@ /* Set the current position to be the mark position. */ virtual void SetMark(void) = 0; - /* Set the direction of rotation. */ - virtual void SetDirection(direction_t direction) = 0; - /* Set the maximum speed in pps. */ virtual void SetMaxSpeed(unsigned int speed) = 0;