diff --git a/lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h b/lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h index 334b42c7d8..ecaafeb7c5 100755 --- a/lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h +++ b/lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_def.h @@ -55,7 +55,9 @@ typedef enum /* Exported macro ------------------------------------------------------------*/ -#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */ +#if !defined(UNUSED) +#define UNUSED(X) ((void)(X)) /* To avoid gcc/g++ warnings */ +#endif #define HAL_MAX_DELAY 0xFFFFFFFFU