X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fdc_motor.c;h=bd0dd0a465d7feafe115bfa8cab64daa758f8009;hb=f0c6ef0573ea9487ce6852249828cfd39cdae6bf;hp=13d8b769aaca72a9def91ff69382eb3c849298e7;hpb=b9c96114f83504fc6492d7aad95aaeb5d68532ac;p=bertos.git diff --git a/bertos/drv/dc_motor.c b/bertos/drv/dc_motor.c index 13d8b769..bd0dd0a4 100644 --- a/bertos/drv/dc_motor.c +++ b/bertos/drv/dc_motor.c @@ -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 @@ -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;