diff options
author | Fabien Poussin <fabien.poussin@gmail.com> | 2019-10-03 11:02:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 11:02:51 +0200 |
commit | 967c2f32649272cbb2fd36e7f062d978193956a8 (patch) | |
tree | 2fc5ad4d0e02b0cd50ff6e874f7d94cec60bf7dd /os/various/fault_handlers/fault_handlers.h | |
parent | 472ee3ce3c8e4e1267cf00611aab54597dda7121 (diff) | |
parent | 1ca49e0b903954c1fd463d29e51faa22436fa33f (diff) | |
download | ChibiOS-Contrib-967c2f32649272cbb2fd36e7f062d978193956a8.tar.gz ChibiOS-Contrib-967c2f32649272cbb2fd36e7f062d978193956a8.tar.bz2 ChibiOS-Contrib-967c2f32649272cbb2fd36e7f062d978193956a8.zip |
Merge pull request #198 from dismirlian/fault_handlers
Fault handlers
Diffstat (limited to 'os/various/fault_handlers/fault_handlers.h')
-rw-r--r-- | os/various/fault_handlers/fault_handlers.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/os/various/fault_handlers/fault_handlers.h b/os/various/fault_handlers/fault_handlers.h new file mode 100644 index 0000000..1fb210b --- /dev/null +++ b/os/various/fault_handlers/fault_handlers.h @@ -0,0 +1,22 @@ +#ifndef FAULT_HANDLERS_H_ +#define FAULT_HANDLERS_H_ + +#include <ch.h> +#include "port_fault_handlers.h" + +/* + * Notes: + * + * 1) #define FAULT_NO_PRINT to remove chprintf, etc + * 2) #define FAULT_INFO_HOOK(fault_info) to receive a struct fault_info when + * a fault is produced. + */ + +struct fault_info { + struct decoded_fault_registers decoded_fault_registers; +#ifndef FAULT_NO_PRINT + char decoded_info_string[300]; +#endif +}; + +#endif /* FAULT_HANDLERS_H_ */ |