CH_DBG_SYSTEM_STATE_CHECK for simulator

This commit is contained in:
rusefi 2018-02-03 16:01:59 -05:00
parent 81ffae8cd3
commit c270d5d07b
2 changed files with 4 additions and 6 deletions

View File

@ -19,13 +19,8 @@
* Unfortunately ChibiOS has two versions of methods for different * Unfortunately ChibiOS has two versions of methods for different
* contexts. * contexts.
*/ */
#ifndef SIMULATOR
#define isLocked() (ch.dbg.lock_cnt > 0) #define isLocked() (ch.dbg.lock_cnt > 0)
#define isIsrContext() (ch.dbg.isr_cnt > 0) #define isIsrContext() (ch.dbg.isr_cnt > 0)
#else
#define isLocked() (0)
#define isIsrContext() (0)
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -339,7 +339,10 @@
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#define CH_DBG_SYSTEM_STATE_CHECK FALSE #define CH_DBG_SYSTEM_STATE_CHECK TRUE
#define ON_LOCK_HOOK
#define ON_UNLOCK_HOOK
#define USE_PORT_LOCK TRUE #define USE_PORT_LOCK TRUE