diff --git a/drivers/usb/device/usb_dc_stm32.c b/drivers/usb/device/usb_dc_stm32.c index 49602108212..03166f74bd0 100644 --- a/drivers/usb/device/usb_dc_stm32.c +++ b/drivers/usb/device/usb_dc_stm32.c @@ -404,7 +404,7 @@ int usb_dc_attach(void) * For STM32F0 series SoCs on QFN28 and TSSOP20 packages enable PIN * pair PA11/12 mapped instead of PA9/10 (e.g. stm32f070x6) */ -#if defined(DT_USB_ENABLE_PIN_REMAP) +#if DT_USB_ENABLE_PIN_REMAP == 1 if (LL_APB1_GRP2_IsEnabledClock(LL_APB1_GRP2_PERIPH_SYSCFG)) { LL_SYSCFG_EnablePinRemap(); } else {