mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
Move common macros to systemlib/px4_macros.h
This commit is contained in:
committed by
Lorenz Meier
parent
f3f235376b
commit
1abd629461
@@ -44,11 +44,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <px4_config.h>
|
#include <px4_config.h>
|
||||||
|
#include <systemlib/px4_macros.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define FREEZE_STR(s) #s
|
|
||||||
#define STRINGIFY(s) FREEZE_STR(s)
|
|
||||||
|
|
||||||
/* The preferred method for publishing a board name is to
|
/* The preferred method for publishing a board name is to
|
||||||
* define it in board_config.h as BOARD_NAME
|
* define it in board_config.h as BOARD_NAME
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -41,8 +41,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#define FREEZE_STR(s) #s
|
|
||||||
#define STRINGIFY(s) FREEZE_STR(s)
|
|
||||||
#define HARDFAULT_FILENO 3
|
#define HARDFAULT_FILENO 3
|
||||||
#define HARDFAULT_PATH BBSRAM_PATH""STRINGIFY(HARDFAULT_FILENO)
|
#define HARDFAULT_PATH BBSRAM_PATH""STRINGIFY(HARDFAULT_FILENO)
|
||||||
#define HARDFAULT_REBOOT_FILENO 0
|
#define HARDFAULT_REBOOT_FILENO 0
|
||||||
|
|||||||
@@ -86,6 +86,14 @@
|
|||||||
#define CAT(a, b) _CAT(a, b)
|
#define CAT(a, b) _CAT(a, b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(FREEZE_STR)
|
||||||
|
# define FREEZE_STR(s) #s
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(STRINGIFY)
|
||||||
|
#define STRINGIFY(s) FREEZE_STR(s)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(CCASSERT)
|
#if !defined(CCASSERT)
|
||||||
#if defined(static_assert)
|
#if defined(static_assert)
|
||||||
# define CCASSERT(predicate) static_assert(predicate)
|
# define CCASSERT(predicate) static_assert(predicate)
|
||||||
@@ -97,7 +105,12 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(DO_PRAGMA)
|
||||||
# define DO_PRAGMA(x) _Pragma (#x)
|
# define DO_PRAGMA(x) _Pragma (#x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(TODO)
|
||||||
# define TODO(x) DO_PRAGMA(message ("TODO - " #x))
|
# define TODO(x) DO_PRAGMA(message ("TODO - " #x))
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _PX4_MACROS_H */
|
#endif /* _PX4_MACROS_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user