Macros to loop over axes

This commit is contained in:
Scott Lahteine
2016-07-23 13:07:23 -07:00
parent a3b5d5eb65
commit 4e67a85a5d
4 changed files with 32 additions and 30 deletions

View File

@ -45,6 +45,9 @@ enum AxisEnum {
Z_HEAD = 5
};
#define LOOP_XYZ(VAR) for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++)
#define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; VAR++)
typedef enum {
LINEARUNIT_MM,
LINEARUNIT_INCH