added support for limit switches and homing action

This commit is contained in:
Simen Svale Skogsrud
2011-02-20 00:29:56 +01:00
parent 9c8c259153
commit d5d6298de3
11 changed files with 158 additions and 8 deletions

View File

@ -24,6 +24,11 @@
#include <avr/io.h>
#include <avr/sleep.h>
#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT)) // All limit bits
#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
#define STEPPING_MASK (STEP_MASK | DIRECTION_MASK) // All stepping-related bits (step/direction)
// Initialize and start the stepper motor subsystem
void st_init();