aboutsummaryrefslogtreecommitdiffstats
path: root/stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog
diff options
context:
space:
mode:
authoriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2009-12-17 02:37:07 +0000
committeriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2009-12-17 02:37:07 +0000
commit32e57dac2e61e79b029593eb4d34d727bcc10678 (patch)
tree98d7ff41993576bb150d13d5f63dc744f6812852 /stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog
downloadlibrambutan-32e57dac2e61e79b029593eb4d34d727bcc10678.tar.gz
librambutan-32e57dac2e61e79b029593eb4d34d727bcc10678.zip
Initial commit of library code, moved from leaftest repo
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@69 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog')
-rw-r--r--stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog24
1 files changed, 24 insertions, 0 deletions
diff --git a/stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog b/stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog
new file mode 100644
index 0000000..dbf6ce9
--- /dev/null
+++ b/stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog
@@ -0,0 +1,24 @@
+/* Exception handlers for STM32 (by Lanchon) */
+
+#ifndef __STM32EXCEPTIONS_H
+#define __STM32EXCEPTIONS_H
+
+#if __cplusplus
+extern "C"
+{
+#endif
+
+/* Use a shared infinite loop for unexpected exceptions. */
+/* #define SHARED_EXCEPTION_HANDLER */
+
+/* Or use an external handler for unexpected exceptions. */
+/* #define CUSTOM_EXCEPTION_HANDLER */
+
+/* Or else use individual infinite loops when debugging,
+ * or a shared infinite loop when not. */
+
+#ifdef CUSTOM_EXCEPTION_HANDLER
+ void unexpected_exception(const char* name, int address);
+ #define DEFAULT_EXCEPTION_HANDLER(handler, name, number, address) unexpected_exception(name, address);
+#endif
+