Spindle DDR pins init minor fix.
This commit is contained in:
parent
567fbf93ed
commit
e9b28279db
@ -23,6 +23,7 @@
|
|||||||
#include "motion_control.h"
|
#include "motion_control.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "planner.h"
|
#include "planner.h"
|
||||||
|
#include "stepper.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
@ -32,6 +33,8 @@ static int current_direction;
|
|||||||
|
|
||||||
void spindle_init()
|
void spindle_init()
|
||||||
{
|
{
|
||||||
|
SPINDLE_ENABLE_DDR |= (1<<SPINDLE_ENABLE_BIT);
|
||||||
|
SPINDLE_DIRECTION_DDR |= (1<<SPINDLE_DIRECTION_BIT);
|
||||||
spindle_run(0, 0);
|
spindle_run(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,10 +34,6 @@
|
|||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
|
|
||||||
// Some useful constants
|
// 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 TICKS_PER_MICROSECOND (F_CPU/1000000)
|
||||||
#define CYCLES_PER_ACCELERATION_TICK ((TICKS_PER_MICROSECOND*1000000)/ACCELERATION_TICKS_PER_SECOND)
|
#define CYCLES_PER_ACCELERATION_TICK ((TICKS_PER_MICROSECOND*1000000)/ACCELERATION_TICKS_PER_SECOND)
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/sleep.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 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 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 DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
|
||||||
|
Loading…
Reference in New Issue
Block a user