From bbbdb6007636376b976e59bd16ab44f68cd60eb3 Mon Sep 17 00:00:00 2001 From: Todd Fleming Date: Wed, 4 Jan 2017 19:04:38 -0500 Subject: [PATCH] step, dir, enable ports --- grbl/config.h | 33 ++++++++++++++++++--------------- grbl/limits.c | 4 ++-- grbl/planner.h | 2 +- grbl/settings.c | 4 ++-- grbl/settings.h | 4 ++-- grbl/stepper.c | 22 +++++++++++----------- grbl/system.h | 2 +- 7 files changed, 37 insertions(+), 34 deletions(-) diff --git a/grbl/config.h b/grbl/config.h index bb8b3f8..963e0e2 100644 --- a/grbl/config.h +++ b/grbl/config.h @@ -28,6 +28,7 @@ #ifndef config_h #define config_h #include "grbl.h" // For Arduino IDE compatibility. +#include "LPC17xx.h" // Define CPU pin map and default settings. @@ -584,26 +585,28 @@ #define SERIAL_UDRE USART_UDRE_vect // Define step pulse output pins. NOTE: All step bit pins must be on the same port. -#define STEP_DDR DDRD -#define STEP_PORT PORTD -#define X_STEP_BIT 2 // Uno Digital Pin 2 -#define Y_STEP_BIT 3 // Uno Digital Pin 3 -#define Z_STEP_BIT 4 // Uno Digital Pin 4 +#define STEP_DDR LPC_GPIO2->FIODIR +#define STEP_PORT LPC_GPIO2->FIOPIN +#define X_STEP_BIT 0 +#define Y_STEP_BIT 1 +#define Z_STEP_BIT 2 #define STEP_MASK ((1<FIODIR +#define DIRECTION_PORT LPC_GPIO0->FIOPIN +#define X_DIRECTION_BIT 5 +#define Y_DIRECTION_BIT 11 +#define Z_DIRECTION_BIT 20 #define DIRECTION_MASK ((1<FIODIR +#define STEPPERS_DISABLE_PORT LPC_GPIO0->FIOPIN +#define X_DISABLE_BIT 4 +#define Y_DISABLE_BIT 10 +#define Z_DISABLE_BIT 19 +#define STEPPERS_DISABLE_MASK ((1<