mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Fix UNUSED() macro conflict with STM libraries
Added `#if !defined(` blocks around the `UNUSED()` definitions in the libraries to prevent conflicts.
This commit is contained in:
parent
966971c750
commit
02a368a8e7
8 changed files with 16 additions and 0 deletions
|
@ -85,7 +85,9 @@ typedef enum
|
||||||
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
||||||
} while(0U)
|
} while(0U)
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) ((void)(x))
|
#define UNUSED(x) ((void)(x))
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @brief Reset the Handle's State field.
|
/** @brief Reset the Handle's State field.
|
||||||
* @param __HANDLE__: specifies the Peripheral Handle.
|
* @param __HANDLE__: specifies the Peripheral Handle.
|
||||||
|
|
|
@ -83,7 +83,9 @@ typedef enum
|
||||||
(__DMA_HANDLE_).Parent = (__HANDLE__); \
|
(__DMA_HANDLE_).Parent = (__HANDLE__); \
|
||||||
} while(0U)
|
} while(0U)
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) ((void)(x))
|
#define UNUSED(x) ((void)(x))
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @brief Reset the Handle's State field.
|
/** @brief Reset the Handle's State field.
|
||||||
* @param __HANDLE__ specifies the Peripheral Handle.
|
* @param __HANDLE__ specifies the Peripheral Handle.
|
||||||
|
|
|
@ -83,7 +83,9 @@ typedef enum
|
||||||
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) ((void)(x))
|
#define UNUSED(x) ((void)(x))
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @brief Reset the Handle's State field.
|
/** @brief Reset the Handle's State field.
|
||||||
* @param __HANDLE__: specifies the Peripheral Handle.
|
* @param __HANDLE__: specifies the Peripheral Handle.
|
||||||
|
|
|
@ -82,7 +82,9 @@ typedef enum
|
||||||
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) ((void)(x))
|
#define UNUSED(x) ((void)(x))
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @brief Reset the Handle's State field.
|
/** @brief Reset the Handle's State field.
|
||||||
* @param __HANDLE__: specifies the Peripheral Handle.
|
* @param __HANDLE__: specifies the Peripheral Handle.
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
#include "usbd_ioreq.h"
|
#include "usbd_ioreq.h"
|
||||||
#include "usbd_msc_mem.h"
|
#include "usbd_msc_mem.h"
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) (void)(x)
|
#define UNUSED(x) (void)(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
|
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -46,7 +46,9 @@
|
||||||
#include "usbd_msc_bot.h"
|
#include "usbd_msc_bot.h"
|
||||||
#include "usbd_req.h"
|
#include "usbd_req.h"
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) (void)(x)
|
#define UNUSED(x) (void)(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
|
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
|
||||||
* @{
|
* @{
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
#include "usbd_msc_mem.h"
|
#include "usbd_msc_mem.h"
|
||||||
#include "usbd_msc_data.h"
|
#include "usbd_msc_data.h"
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) (void)(x)
|
#define UNUSED(x) (void)(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,4 +18,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(UNUSED)
|
||||||
#define UNUSED(x) (void)(x)
|
#define UNUSED(x) (void)(x)
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue