grlib/pwm: Fix PWM enable bit check, CID 1399774

This commit is contained in:
Matteo Concas
2024-10-08 09:17:23 +02:00
committed by Sebastian Huber
parent de56c23c14
commit 93413ed315

View File

@@ -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 ) {