aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms')
-rw-r--r--os/hal/platforms/STM32/pwm_lld.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.h b/os/hal/platforms/STM32/pwm_lld.h
index 8b1761f82..b6a614fe1 100644
--- a/os/hal/platforms/STM32/pwm_lld.h
+++ b/os/hal/platforms/STM32/pwm_lld.h
@@ -416,8 +416,8 @@ struct PWMDriver {
* @notapi
*/
#define pwm_lld_is_channel_enabled(pwmp, channel) \
- ((pwmp->tim->CCR[channel] == 0) && \
- ((pwmp->tim->DIER & (2 << channel)) == 0))
+ ((pwmp->tim->CCR[channel] != 0) || \
+ ((pwmp->tim->DIER & (2 << channel)) != 0))
/*===========================================================================*/
/* External declarations. */