Improved chSysHalt().

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9795 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2016-09-25 06:37:59 +00:00
parent 7262b9b844
commit 43aa123e65
2 changed files with 4 additions and 3 deletions

View File

@ -298,6 +298,7 @@ void chSysHalt(const char *reason) {
(void)reason;
#endif
/* Halt hook code, usually empty.*/
CH_CFG_SYSTEM_HALT_HOOK(reason);
/* Harmless infinite loop.*/

View File

@ -193,15 +193,15 @@ void chSysHalt(const char *reason) {
port_disable();
/* Halt hook code, usually empty.*/
CH_CFG_SYSTEM_HALT_HOOK(reason);
/* Logging the event.*/
_trace_halt(reason);
/* Pointing to the passed message.*/
ch.dbg.panic_msg = reason;
/* Halt hook code, usually empty.*/
CH_CFG_SYSTEM_HALT_HOOK(reason);
/* Harmless infinite loop.*/
while (true) {
}