From 4cac11ec86415cb364c8a15701c96e948cf5996d Mon Sep 17 00:00:00 2001 From: Simen Svale Skogsrud Date: Fri, 25 Feb 2011 13:30:03 +0100 Subject: [PATCH] fixed synchronization problem with spindle_control --- spindle_control.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/spindle_control.c b/spindle_control.c index 548e477..34d559b 100644 --- a/spindle_control.c +++ b/spindle_control.c @@ -25,24 +25,28 @@ #include +static int current_direction; + void spindle_init() { - SPINDLE_ENABLE_DDR |= 1<= 0) { - SPINDLE_DIRECTION_PORT &= ~(1<= 0) { + SPINDLE_DIRECTION_PORT &= ~(1<