Skip to content

Commit

Permalink
Spindle DDR pins init minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
chamnit committed Feb 12, 2012
1 parent 567fbf9 commit e9b2827
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions spindle_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "motion_control.h"
#include "config.h"
#include "planner.h"
#include "stepper.h"

#include <stdint.h>

Expand All @@ -32,6 +33,8 @@ static int current_direction;

void spindle_init()
{
SPINDLE_ENABLE_DDR |= (1<<SPINDLE_ENABLE_BIT);
SPINDLE_DIRECTION_DDR |= (1<<SPINDLE_DIRECTION_BIT);
spindle_run(0, 0);
}

Expand Down
4 changes: 0 additions & 4 deletions stepper.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
#include "limits.h"

// Some useful constants
#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)

#define TICKS_PER_MICROSECOND (F_CPU/1000000)
#define CYCLES_PER_ACCELERATION_TICK ((TICKS_PER_MICROSECOND*1000000)/ACCELERATION_TICKS_PER_SECOND)

Expand Down
1 change: 1 addition & 0 deletions stepper.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <avr/io.h>
#include <avr/sleep.h>

// Some useful constants
#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
Expand Down

0 comments on commit e9b2827

Please sign in to comment.