diff --git a/configs/lpc4337-ws/src/lpc43_appinit.c b/configs/lpc4337-ws/src/lpc43_appinit.c index 047b544caa..3c5acc8584 100644 --- a/configs/lpc4337-ws/src/lpc43_appinit.c +++ b/configs/lpc4337-ws/src/lpc43_appinit.c @@ -141,7 +141,7 @@ int board_app_initialize(uintptr_t arg) lpc43_i2ctool(); -#ifdef CONFIG_ADC +#ifdef CONFIG_LPC43_ADC0 /* Initialize ADC and register the ADC driver. */ ret = lpc43_adc_setup(); diff --git a/configs/stm32f103-minimum/src/stm32_pwm.c b/configs/stm32f103-minimum/src/stm32_pwm.c index 5248e48921..dec2597991 100644 --- a/configs/stm32f103-minimum/src/stm32_pwm.c +++ b/configs/stm32f103-minimum/src/stm32_pwm.c @@ -81,7 +81,7 @@ # undef HAVE_PWM #endif -#if CONFIG_STM32_TIM3_CHANNEL != STM32F103MINIMUM_PWMCHANNEL +#if !defined(CONFIG_STM32_TIM3_CHANNEL) || CONFIG_STM32_TIM3_CHANNEL != STM32F103MINIMUM_PWMCHANNEL # undef HAVE_PWM #endif diff --git a/configs/stm32f4discovery/src/stm32_pwm.c b/configs/stm32f4discovery/src/stm32_pwm.c index 1b8468d2bb..48b7ff3a5f 100644 --- a/configs/stm32f4discovery/src/stm32_pwm.c +++ b/configs/stm32f4discovery/src/stm32_pwm.c @@ -79,7 +79,7 @@ # undef HAVE_PWM #endif -#if CONFIG_STM32_TIM4_CHANNEL != STM32F4DISCOVERY_PWMCHANNEL +#if !defined(CONFIG_STM32_TIM4_CHANNEL) || CONFIG_STM32_TIM4_CHANNEL != STM32F4DISCOVERY_PWMCHANNEL # undef HAVE_PWM #endif