This commit is contained in:
rusefi 2017-07-22 22:45:49 -04:00
parent 00a96ebce9
commit ca02889c38
1 changed files with 41 additions and 0 deletions

View File

@ -28,6 +28,8 @@
#ifndef _CHCONF_H_ #ifndef _CHCONF_H_
#define _CHCONF_H_ #define _CHCONF_H_
#define _CHIBIOS_RT_CONF_
#define PORT_IDLE_THREAD_STACK_SIZE 1024 #define PORT_IDLE_THREAD_STACK_SIZE 1024
#define PORT_INT_REQUIRED_STACK 768 #define PORT_INT_REQUIRED_STACK 768
#define CHPRINTF_USE_FLOAT TRUE #define CHPRINTF_USE_FLOAT TRUE
@ -392,6 +394,21 @@ extern "C"
#define CH_DBG_ENABLE_ASSERTS TRUE #define CH_DBG_ENABLE_ASSERTS TRUE
#endif #endif
/**
* @brief Debug option, trace buffer.
* @details If enabled then the trace buffer is activated.
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
/**
* @brief Trace buffer entries.
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
* different from @p CH_DBG_TRACE_MASK_DISABLED.
*/
#define CH_DBG_TRACE_BUFFER_SIZE 128
/** /**
* @brief Debug option, trace buffer. * @brief Debug option, trace buffer.
* @details If enabled then the context switch circular trace buffer is * @details If enabled then the context switch circular trace buffer is
@ -489,6 +506,20 @@ extern "C"
/* Context switch code here.*/ \ /* Context switch code here.*/ \
} }
/**
* @brief ISR enter hook.
*/
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
/* IRQ prologue code here.*/ \
}
/**
* @brief ISR exit hook.
*/
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
/* IRQ epilogue code here.*/ \
}
/** /**
* @brief Idle thread enter hook. * @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions * @note This hook is invoked within a critical zone, no OS functions
@ -534,6 +565,16 @@ extern "C"
chDbgPanic3(reason, __FILE__, __LINE__); \ chDbgPanic3(reason, __FILE__, __LINE__); \
} }
/**
* @brief Trace hook.
* @details This hook is invoked each time a new record is written in the
* trace buffer.
*/
#define CH_CFG_TRACE_HOOK(tep) { \
/* Trace code here.*/ \
}
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/