aboutsummaryrefslogtreecommitdiffstats
path: root/os/various/fault_handlers/fault_handlers.h
blob: 1fb210b6fc52000947e2ca12fab304a4350d6ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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_ */