[HAL][GENERIC] Allow redefinition of macro UNUSED(x)
diff --git a/Inc/stm32f4xx_hal_def.h b/Inc/stm32f4xx_hal_def.h
index f9bbec2..1df0d7d 100644
--- a/Inc/stm32f4xx_hal_def.h
+++ b/Inc/stm32f4xx_hal_def.h
@@ -54,7 +54,9 @@
 
 /* Exported macro ------------------------------------------------------------*/
 
+#if !defined(UNUSED)
 #define UNUSED(X) (void)X      /* To avoid gcc/g++ warnings */
+#endif /* UNUSED */
 
 #define HAL_MAX_DELAY      0xFFFFFFFFU