From 7ea059f945003c90ab56b1e6f762df9ae29ddf3c Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Sun, 25 Apr 2010 17:51:26 -0400 Subject: Added assert fails to exc.c --- libmaple/exc.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'libmaple') diff --git a/libmaple/exc.c b/libmaple/exc.c index ebf4b90..dd02476 100644 --- a/libmaple/exc.c +++ b/libmaple/exc.c @@ -1,3 +1,4 @@ + /* ***************************************************************************** * The MIT License * @@ -22,24 +23,41 @@ * THE SOFTWARE. * ****************************************************************************/ +/** + * @brief libmaple exception handlers. If MAPLE_DEBUG is set, then these + * exceptions will ASSERT fail and call into the default _fail() light + * blinking. + */ + +#include "util.h" + void NMIException(void) { + ASSERT(0); + while(1) + ; } + void HardFaultException(void) { - while (1) { - } + ASSERT(0); + while(1) + ; } void MemManageException(void) { - while (1) { - } + ASSERT(0); + while(1) + ; } void BusFaultException(void) { - while (1) { - } + ASSERT(0); + while(1) + ; } void UsageFaultException(void) { - while (1) { - } + ASSERT(0); + while(1) + ; } + -- cgit v1.2.3