Spindle DDR pins init minor fix.

This commit is contained in:
Sonny Jeon 2012-02-12 11:02:23 -07:00
parent 567fbf93ed
commit e9b28279db
3 changed files with 4 additions and 4 deletions

View File

@ -23,6 +23,7 @@
#include "motion_control.h"
#include "config.h"
#include "planner.h"
#include "stepper.h"
#include <stdint.h>
@ -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);
}

View File

@ -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)

View File

@ -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