drivers: pwm: mcux: ftm: return -EBUSY if PWM capture in progress
Return -EBUSY (not 0) from pwm_pin_enable_capture() if PWM capture is already in progress. Fixes: #39817 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
213ad01ed0
commit
351d065f63
1 changed files with 2 additions and 2 deletions
|
@ -228,8 +228,8 @@ static int mcux_ftm_pin_enable_capture(const struct device *dev, uint32_t pwm)
|
|||
}
|
||||
|
||||
if (FTM_GetEnabledInterrupts(config->base) & BIT(PAIR_2ND_CH(pair))) {
|
||||
LOG_WRN("Capture already active on channel pair %d", pair);
|
||||
return 0;
|
||||
LOG_ERR("Capture already active on channel pair %d", pair);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
FTM_ClearStatusFlags(config->base, BIT(PAIR_1ST_CH(pair)) |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue