From 93413ed3152ee89cdcb48d79048752b2b7e43a72 Mon Sep 17 00:00:00 2001 From: Matteo Concas Date: Tue, 8 Oct 2024 09:17:23 +0200 Subject: [PATCH] grlib/pwm: Fix PWM enable bit check, CID 1399774 --- bsps/shared/grlib/pwm/grpwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsps/shared/grlib/pwm/grpwm.c b/bsps/shared/grlib/pwm/grpwm.c index 32d16a2da8..974aa7b39f 100644 --- a/bsps/shared/grlib/pwm/grpwm.c +++ b/bsps/shared/grlib/pwm/grpwm.c @@ -499,7 +499,7 @@ static rtems_status_code grpwm_config_channel( unsigned int pctrl, wctrl=0; pwm = priv->channels[channel]; - if ( pwm->pwmregs->ctrl & GRPWM_PCTRL_EN_BIT ) { + if ( pwm->pwmregs->ctrl & GRPWM_PCTRL_EN ) { return RTEMS_RESOURCE_IN_USE; } if ( cfg->options & ~GRPWM_CONFIG_OPTION_MASK ) {