mirror of https://github.com/rusefi/rusefi-1.git
reducing code duplication
This commit is contained in:
parent
6915852a7a
commit
6a2473ccc1
|
@ -748,16 +748,6 @@ extern "C"
|
|||
void chDbgPanic3(const char *msg, const char * file, int line);
|
||||
#endif
|
||||
|
||||
|
||||
#define chDbgAssert(c, remark) do { \
|
||||
if (CH_DBG_ENABLE_ASSERTS != FALSE) { \
|
||||
if (!(c)) { \
|
||||
/*lint -restore*/ \
|
||||
chSysHalt(remark); \
|
||||
} \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#undef ENABLE_PERF_TRACE
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
#define TRACE_BUFFER_LENGTH 1
|
||||
|
|
|
@ -742,24 +742,11 @@
|
|||
/*===========================================================================*/
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void chDbgPanic3(const char *msg, const char * file, int line);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#define chDbgAssert(c, remark) do { \
|
||||
if (CH_DBG_ENABLE_ASSERTS != FALSE) { \
|
||||
if (!(c)) { \
|
||||
/*lint -restore*/ \
|
||||
chSysHalt(remark); \
|
||||
} \
|
||||
} \
|
||||
} while (false)
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif // __cplusplus
|
||||
void chDbgPanic3(const char *msg, const char * file, int line);
|
||||
#endif // __ASSEMBLER__
|
||||
|
||||
#undef ENABLE_PERF_TRACE
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
|
|
|
@ -122,4 +122,14 @@ extern "C" {
|
|||
#define hasOsPanicError() (FALSE)
|
||||
#endif
|
||||
|
||||
#define chDbgAssert(c, remark) do { \
|
||||
if (CH_DBG_ENABLE_ASSERTS != FALSE) { \
|
||||
if (!(c)) { \
|
||||
/*lint -restore*/ \
|
||||
firmwareError(OBD_PCM_Processor_Fault, "chDbg %s", remark); \
|
||||
chSysHalt(remark); \
|
||||
} \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#endif /* CONFIG_CHCONF_COMMON_H_ */
|
||||
|
|
|
@ -759,16 +759,6 @@ void chDbgPanic3(const char *msg, const char * file, int line);
|
|||
#endif
|
||||
|
||||
|
||||
#define chDbgAssert(c, remark) do { \
|
||||
if (CH_DBG_ENABLE_ASSERTS != FALSE) { \
|
||||
if (!(c)) { \
|
||||
/*lint -restore*/ \
|
||||
firmwareError(OBD_PCM_Processor_Fault, "chDbg %s", remark); \
|
||||
chSysHalt(remark); \
|
||||
} \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -761,16 +761,6 @@ void chDbgPanic3(const char *msg, const char * file, int line);
|
|||
#endif
|
||||
|
||||
|
||||
#define chDbgAssert(c, remark) do { \
|
||||
if (CH_DBG_ENABLE_ASSERTS != FALSE) { \
|
||||
if (!(c)) { \
|
||||
/*lint -restore*/ \
|
||||
firmwareError(OBD_PCM_Processor_Fault, "chDbg %s", remark); \
|
||||
chSysHalt(remark); \
|
||||
} \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Reference in New Issue