aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-04-25 17:51:26 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-04-25 17:51:26 -0400
commit7ea059f945003c90ab56b1e6f762df9ae29ddf3c (patch)
tree8f900a4e7e3662915be6d774b50037f06dd8bf97
parente608ac87afd39ed837ad3518bec652e3fd6eeffa (diff)
downloadlibrambutan-7ea059f945003c90ab56b1e6f762df9ae29ddf3c.tar.gz
librambutan-7ea059f945003c90ab56b1e6f762df9ae29ddf3c.zip
Added assert fails to exc.c
-rw-r--r--libmaple/exc.c34
1 files changed, 26 insertions, 8 deletions
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)
+ ;
}
+