aboutsummaryrefslogtreecommitdiffstats
path: root/stm32conf/lanchon-stm32/src/exceptions/stm32exceptions.h.prolog
diff options
context:
space:
mode:
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
+