git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4328 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2012-06-23 12:03:00 +00:00
parent 2454bb1133
commit 2abe2c479f
3 changed files with 5 additions and 6 deletions

View File

@ -72,7 +72,7 @@
typedef enum {
MAC_UNINIT = 0, /**< Not initialized. */
MAC_STOP = 1, /**< Stopped. */
MAC_ACTIVE = 2, /**< Active. */
MAC_ACTIVE = 2 /**< Active. */
} macstate_t;
/**

View File

@ -202,8 +202,6 @@ extern ch_trace_buffer_t dbg_trace_buffer;
#define chDbgAssert(c, m, r) {(void)(c);}
#endif /* !CH_DBG_ENABLE_ASSERTS */
extern char *dbg_panic_msg;
/*===========================================================================*/
/* Panic related macros. */
/*===========================================================================*/
@ -237,7 +235,8 @@ extern "C" {
void dbg_trace(Thread *otp);
#endif
#if CH_DBG_ENABLED
void chDbgPanic(char *msg);
extern const char *dbg_panic_msg;
void chDbgPanic(const char *msg);
#endif
#ifdef __cplusplus
}

View File

@ -254,14 +254,14 @@ void dbg_trace(Thread *otp) {
* @details This pointer is meant to be accessed through the debugger, it is
* written once and then the system is halted.
*/
char *dbg_panic_msg;
const char *dbg_panic_msg;
/**
* @brief Prints a panic message on the console and then halts the system.
*
* @param[in] msg the pointer to the panic message string
*/
void chDbgPanic(char *msg) {
void chDbgPanic(const char *msg) {
dbg_panic_msg = msg;
chSysHalt();