From ded77bccb3e2a09094ff7cd7e57aba3cf7454a87 Mon Sep 17 00:00:00 2001 From: Mahesh Mahadevan Date: Tue, 12 Sep 2023 09:52:56 -0500 Subject: [PATCH] drivers: pwm: Use the SDK macro to check if wait field is available Wait enable is available only for certain SoC's Signed-off-by: Mahesh Mahadevan --- drivers/pwm/pwm_mcux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pwm/pwm_mcux.c b/drivers/pwm/pwm_mcux.c index 23bbd3d032..d753682f46 100644 --- a/drivers/pwm/pwm_mcux.c +++ b/drivers/pwm/pwm_mcux.c @@ -199,7 +199,9 @@ static int pwm_mcux_init(const struct device *dev) pwm_config.reloadLogic = config->reload; pwm_config.clockSource = kPWM_BusClock; pwm_config.enableDebugMode = config->run_debug; +#if !defined(FSL_FEATURE_PWM_HAS_NO_WAITEN) || (!FSL_FEATURE_PWM_HAS_NO_WAITEN) pwm_config.enableWait = config->run_wait; +#endif status = PWM_Init(config->base, config->index, &pwm_config); if (status != kStatus_Success) {