Revert wrongly committed file.
[bertos.git] / bertos / drv / dc_motor.c
index 13d8b769aaca72a9def91ff69382eb3c849298e7..bd0dd0a465d7feafe115bfa8cab64daa758f8009 100644 (file)
@@ -82,7 +82,7 @@
 #define DC_MOTOR_SET_STATUS_DIR(status, dir) \
                (dir == POS_DIR ? DC_MOTOR_POS_DIR(status) : DC_MOTOR_NEG_DIR(status))
 
-#if CONFIG_KERN_PREEMPT
+#if (CONFIG_KERN && CONFIG_KERN_PREEMPT)
        #if CONFIG_DC_MOTOR_USE_SEM
                #include <kern/sem.h>
 
@@ -192,7 +192,7 @@ static void dc_motor_do(int index)
        DC_MOTOR_LOCK;
 
        //If select DC motor is not active we return
-       if (!dcm->status & DC_MOTOR_ACTIVE)
+       if (!(dcm->status & DC_MOTOR_ACTIVE))
        {
                DC_MOTOR_UNLOCK;
                return;