From c2aec12004be91b97e58933eb26d9c3a594c602e Mon Sep 17 00:00:00 2001 From: Simen Svale Skogsrud Date: Tue, 31 May 2011 13:08:42 +0200 Subject: [PATCH] converted the STEPPER_ENABLE_PIN to a STEPPER_DISABLE_PIN as per the request of Alden Hart of Grbl Shield fame. --- config.h | 12 ++++++------ main.c | 5 ++++- stepper.c | 30 ++++++++++++++++-------------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/config.h b/config.h index 3a82e46..e2811cd 100644 --- a/config.h +++ b/config.h @@ -26,9 +26,9 @@ // Updated default pin-assignments from 0.6 onwards // (see bottom of file for a copy of the old config) -#define STEPPERS_ENABLE_DDR DDRB -#define STEPPERS_ENABLE_PORT PORTB -#define STEPPERS_ENABLE_BIT 0 +#define STEPPERS_DISABLE_DDR DDRB +#define STEPPERS_DISABLE_PORT PORTB +#define STEPPERS_DISABLE_BIT 0 #define STEPPING_DDR DDRD #define STEPPING_PORT PORTD @@ -61,9 +61,9 @@ // Pin-assignments from Grbl 0.5 -// #define STEPPERS_ENABLE_DDR DDRD -// #define STEPPERS_ENABLE_PORT PORTD -// #define STEPPERS_ENABLE_BIT 2 +// #define STEPPERS_DISABLE_DDR DDRD +// #define STEPPERS_DISABLE_PORT PORTD +// #define STEPPERS_DISABLE_BIT 2 // // #define STEPPING_DDR DDRC // #define STEPPING_PORT PORTC diff --git a/main.c b/main.c index 60349cf..e156a14 100644 --- a/main.c +++ b/main.c @@ -20,6 +20,7 @@ #include #include +#include #include #include "planner.h" #include "stepper.h" @@ -44,7 +45,9 @@ int main(void) st_init(); spindle_init(); gc_init(); - limits_init(); + limits_init(); + + sei(); for(;;){ sleep_mode(); // Wait for it ... diff --git a/stepper.c b/stepper.c index f011a6a..802f8ac 100644 --- a/stepper.c +++ b/stepper.c @@ -43,9 +43,6 @@ #define MINIMUM_STEPS_PER_MINUTE 1200 // The stepper subsystem will never run slower than this, exept when sleeping -#define ENABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 |= (1<