aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/os/various/fault_handlers/fault_handlers.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/os/various/fault_handlers/fault_handlers.h')
-rw-r--r--lib/chibios-contrib/os/various/fault_handlers/fault_handlers.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/various/fault_handlers/fault_handlers.h b/lib/chibios-contrib/os/various/fault_handlers/fault_handlers.h
new file mode 100644
index 000000000..1fb210b6f
--- /dev/null
+++ b/lib/chibios-contrib/os/various/fault_handlers/fault_handlers.h
@@ -0,0 +1,22 @@
1#ifndef FAULT_HANDLERS_H_
2#define FAULT_HANDLERS_H_
3
4#include <ch.h>
5#include "port_fault_handlers.h"
6
7/*
8 * Notes:
9 *
10 * 1) #define FAULT_NO_PRINT to remove chprintf, etc
11 * 2) #define FAULT_INFO_HOOK(fault_info) to receive a struct fault_info when
12 * a fault is produced.
13 */
14
15struct fault_info {
16 struct decoded_fault_registers decoded_fault_registers;
17#ifndef FAULT_NO_PRINT
18 char decoded_info_string[300];
19#endif
20};
21
22#endif /* FAULT_HANDLERS_H_ */