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

This commit is contained in:
Matteo Concas authored and Sebastian Huber committed 2024-10-21 07:02:51 +00:00
1 parent de56c23c14
commit 93413ed315
1 file changed
+1 -1
+1 -1
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 ) {