[HAL][GENERIC] Allow redefinition of macro UNUSED(x)
diff --git a/Inc/stm32f1xx_hal_def.h b/Inc/stm32f1xx_hal_def.h
index 581142c..0b281a3 100644
--- a/Inc/stm32f1xx_hal_def.h
+++ b/Inc/stm32f1xx_hal_def.h
@@ -64,7 +64,9 @@
                               (__DMA_HANDLE__).Parent = (__HANDLE__);             \
                           } while(0U)
 
+#if !defined(UNUSED)
 #define UNUSED(X) (void)X      /* To avoid gcc/g++ warnings */
+#endif /* UNUSED */
 
 /** @brief Reset the Handle's State field.
   * @param __HANDLE__ specifies the Peripheral Handle.