Control up to 4 steppers axis with limit switch logic from serial port

Dependencies:   mbed

Committer:
jm
Date:
Sat Feb 12 16:49:03 2011 +0000
Revision:
0:3e676fcd9c71
jmStepperAxis Command Line Interface Module

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jm 0:3e676fcd9c71 1 /*************************************************************************
jm 0:3e676fcd9c71 2 * @file jmStepperAxis.h
jm 0:3e676fcd9c71 3 * @brief
jm 0:3e676fcd9c71 4 * .
jm 0:3e676fcd9c71 5 * @version 1.0
jm 0:3e676fcd9c71 6 * @date Feb 12, 2011
jm 0:3e676fcd9c71 7 */
jm 0:3e676fcd9c71 8
jm 0:3e676fcd9c71 9 /*
jm 0:3e676fcd9c71 10 * Module Command Line Interface
jm 0:3e676fcd9c71 11 Format: command name (arg info)min..max values [optional argument]
jm 0:3e676fcd9c71 12
jm 0:3e676fcd9c71 13
jm 0:3e676fcd9c71 14 * Module Events
jm 0:3e676fcd9c71 15
jm 0:3e676fcd9c71 16 * Module Feedback and Help messages may be enabled/disabled by Command Lines.
jm 0:3e676fcd9c71 17 feedback (enable/disable)0..1
jm 0:3e676fcd9c71 18 help (enable/disable)0..1
jm 0:3e676fcd9c71 19
jm 0:3e676fcd9c71 20 */
jm 0:3e676fcd9c71 21
jm 0:3e676fcd9c71 22 #ifndef jmStepperAxisdef
jm 0:3e676fcd9c71 23 #define jmStepperAxisdef 1
jm 0:3e676fcd9c71 24
jm 0:3e676fcd9c71 25 #define stepperAxisQty 4 // 4 steppers max
jm 0:3e676fcd9c71 26
jm 0:3e676fcd9c71 27 #include "LPC17xx.h"
jm 0:3e676fcd9c71 28
jm 0:3e676fcd9c71 29 // Module Data Structure
jm 0:3e676fcd9c71 30 extern struct StructStepperAxis{
jm 0:3e676fcd9c71 31 uint8_t active;
jm 0:3e676fcd9c71 32 uint8_t limitCW;
jm 0:3e676fcd9c71 33 uint8_t limitCCW;
jm 0:3e676fcd9c71 34 uint8_t stepperID;
jm 0:3e676fcd9c71 35 uint8_t status;
jm 0:3e676fcd9c71 36 }sStepperAxis[stepperAxisQty];
jm 0:3e676fcd9c71 37
jm 0:3e676fcd9c71 38 #endif
jm 0:3e676fcd9c71 39
jm 0:3e676fcd9c71 40 // Module Prototypes
jm 0:3e676fcd9c71 41 void StepperAxisInit(void);
jm 0:3e676fcd9c71 42 void StepperAxisSM(void);
jm 0:3e676fcd9c71 43 void cli_StepperAxis(void);
jm 0:3e676fcd9c71 44 void rGPPSTA(unsigned int id );
jm 0:3e676fcd9c71 45 void cli_GPPSTA(void);
jm 0:3e676fcd9c71 46
jm 0:3e676fcd9c71 47 //-------------------------- CLIG PLUGS --------------------
jm 0:3e676fcd9c71 48 // CLIG-INCLUDE
jm 0:3e676fcd9c71 49 /*
jm 0:3e676fcd9c71 50 #include "jmStepperAxis.h"
jm 0:3e676fcd9c71 51 */
jm 0:3e676fcd9c71 52
jm 0:3e676fcd9c71 53 // CLIG-INIT
jm 0:3e676fcd9c71 54 /*
jm 0:3e676fcd9c71 55 StepperAxisInit();
jm 0:3e676fcd9c71 56 */
jm 0:3e676fcd9c71 57
jm 0:3e676fcd9c71 58 // CLIG-NEEDS
jm 0:3e676fcd9c71 59 /*
jm 0:3e676fcd9c71 60 jmStepper
jm 0:3e676fcd9c71 61 jmSwitch
jm 0:3e676fcd9c71 62 */
jm 0:3e676fcd9c71 63
jm 0:3e676fcd9c71 64 // CLIG-CMD
jm 0:3e676fcd9c71 65 /*
jm 0:3e676fcd9c71 66 stepperAxis cli_StepperAxis();
jm 0:3e676fcd9c71 67 GPPSTA cli_GPPSTA();
jm 0:3e676fcd9c71 68 */
jm 0:3e676fcd9c71 69
jm 0:3e676fcd9c71 70 // CLIG-SM
jm 0:3e676fcd9c71 71 /*
jm 0:3e676fcd9c71 72 StepperAxisSM();
jm 0:3e676fcd9c71 73 */
jm 0:3e676fcd9c71 74 //-------------------------- END CLIG PLUGS --------------------