Skip to content

Commit 973987e

Browse files
committed
Improved erpc_assert config
1 parent 639d72a commit 973987e

File tree

4 files changed

+12
-21
lines changed

4 files changed

+12
-21
lines changed

erpc_c/config/erpc_config.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
#ifndef _ERPC_CONFIG_H_
1212
#define _ERPC_CONFIG_H_
1313

14+
#if !defined(erpc_assert)
1415
#include <cassert>
16+
#define erpc_assert(condition) assert(condition) //!< Assert function.
17+
#endif
1518

1619
/*!
1720
* @addtogroup config
@@ -183,12 +186,6 @@
183186
//! Uncomment for using pre post default callback feature.
184187
//#define ERPC_PRE_POST_ACTION_DEFAULT (ERPC_PRE_POST_ACTION_DEFAULT_ENABLED)
185188

186-
//! @name Assert function definition
187-
//@{
188-
#define erpc_assert(condition) assert(condition) //!< Assert function.
189-
//@}
190-
191-
192189
/*! @} */
193190
#endif // _ERPC_CONFIG_H_
194191
////////////////////////////////////////////////////////////////////////////////

erpcsniffer/src/erpc_config.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
#ifndef _ERPC_CONFIG_H_
1111
#define _ERPC_CONFIG_H_
1212

13+
#if !defined(erpc_assert)
1314
#include <cassert>
15+
#define erpc_assert(condition) assert(condition) //!< Assert function.
16+
#endif
1417

1518
////////////////////////////////////////////////////////////////////////////////
1619
// Declarations
@@ -176,11 +179,6 @@
176179
//! Uncomment for using pre post default callback feature.
177180
//#define ERPC_PRE_POST_ACTION_DEFAULT (ERPC_PRE_POST_ACTION_DEFAULT_ENABLED)
178181

179-
//! @name Assert function definition
180-
//@{
181-
#define erpc_assert(condition) assert(condition) //!< Assert function.
182-
//@}
183-
184182
/*! @} */
185183
#endif // _ERPC_CONFIG_H_
186184
////////////////////////////////////////////////////////////////////////////////

test/common/config/erpc_config.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
#ifndef _ERPC_CONFIG_H_
1111
#define _ERPC_CONFIG_H_
1212

13+
#if !defined(erpc_assert)
1314
#include <cassert>
15+
#define erpc_assert(condition) assert(condition) //!< Assert function.
16+
#endif
1417

1518
/*!
1619
* @addtogroup config
@@ -182,11 +185,6 @@
182185
//! Uncomment for using pre post default callback feature.
183186
//#define ERPC_PRE_POST_ACTION_DEFAULT (ERPC_PRE_POST_ACTION_DEFAULT_ENABLED)
184187

185-
//! @name Assert function definition
186-
//@{
187-
#define erpc_assert(condition) assert(condition) //!< Assert function.
188-
//@}
189-
190188
/*! @} */
191189
#endif // _ERPC_CONFIG_H_
192190
////////////////////////////////////////////////////////////////////////////////

test/test_arbitrator/config/erpc_config.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
#ifndef _ERPC_CONFIG_H_
1010
#define _ERPC_CONFIG_H_
1111

12+
#if !defined(erpc_assert)
1213
#include <cassert>
14+
#define erpc_assert(condition) assert(condition) //!< Assert function.
15+
#endif
1316

1417
/*!
1518
* @addtogroup config
@@ -181,11 +184,6 @@
181184
//! Uncomment for using pre post default callback feature.
182185
//#define ERPC_PRE_POST_ACTION_DEFAULT (ERPC_PRE_POST_ACTION_DEFAULT_ENABLED)
183186

184-
//! @name Assert function definition
185-
//@{
186-
#define erpc_assert(condition) assert(condition) //!< Assert function.
187-
//@}
188-
189187
/*! @} */
190188
#endif // _ERPC_CONFIG_H_
191189
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)