diff --git a/lib/main/STM32F1/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h b/lib/main/STM32F1/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h index 267b1101c8..a904b4e3db 100644 --- a/lib/main/STM32F1/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h +++ b/lib/main/STM32F1/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h @@ -85,7 +85,9 @@ typedef enum (__DMA_HANDLE__).Parent = (__HANDLE__); \ } while(0U) +#if !defined(UNUSED) #define UNUSED(x) ((void)(x)) +#endif /** @brief Reset the Handle's State field. * @param __HANDLE__: specifies the Peripheral Handle. diff --git a/lib/main/STM32F3/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h b/lib/main/STM32F3/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h index a5b9c22c0f..a59c67fd44 100644 --- a/lib/main/STM32F3/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h +++ b/lib/main/STM32F3/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h @@ -83,7 +83,9 @@ typedef enum (__DMA_HANDLE_).Parent = (__HANDLE__); \ } while(0U) +#if !defined(UNUSED) #define UNUSED(x) ((void)(x)) +#endif /** @brief Reset the Handle's State field. * @param __HANDLE__ specifies the Peripheral Handle. diff --git a/lib/main/STM32F4/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h b/lib/main/STM32F4/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h index b9fd4170b4..ca07775ba8 100644 --- a/lib/main/STM32F4/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h +++ b/lib/main/STM32F4/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h @@ -83,7 +83,9 @@ typedef enum (__DMA_HANDLE__).Parent = (__HANDLE__); \ } while(0) +#if !defined(UNUSED) #define UNUSED(x) ((void)(x)) +#endif /** @brief Reset the Handle's State field. * @param __HANDLE__: specifies the Peripheral Handle. 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 20e1341ec1..795de8fb90 100644 --- 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 @@ -82,7 +82,9 @@ typedef enum (__DMA_HANDLE__).Parent = (__HANDLE__); \ } while(0) +#if !defined(UNUSED) #define UNUSED(x) ((void)(x)) +#endif /** @brief Reset the Handle's State field. * @param __HANDLE__: specifies the Peripheral Handle. diff --git a/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c b/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c index 4f53a4f25e..2c008723de 100644 --- a/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c +++ b/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c @@ -31,7 +31,9 @@ #include "usbd_ioreq.h" #include "usbd_msc_mem.h" +#if !defined(UNUSED) #define UNUSED(x) (void)(x) +#endif /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY * @{ diff --git a/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c b/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c index aeccca3fb2..56ad81b0c8 100644 --- a/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c +++ b/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c @@ -46,7 +46,9 @@ #include "usbd_msc_bot.h" #include "usbd_req.h" +#if !defined(UNUSED) #define UNUSED(x) (void)(x) +#endif /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY * @{ diff --git a/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c b/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c index 326cf757f5..fc53850840 100644 --- a/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c +++ b/lib/main/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c @@ -31,7 +31,9 @@ #include "usbd_msc_mem.h" #include "usbd_msc_data.h" +#if !defined(UNUSED) #define UNUSED(x) (void)(x) +#endif diff --git a/src/test/unit/unittest_macros.h b/src/test/unit/unittest_macros.h index 67e8249cad..aea1f14a8f 100644 --- a/src/test/unit/unittest_macros.h +++ b/src/test/unit/unittest_macros.h @@ -18,4 +18,6 @@ #pragma once +#if !defined(UNUSED) #define UNUSED(x) (void)(x) +#endif