File tree Expand file tree Collapse file tree 2 files changed +52
-21
lines changed Expand file tree Collapse file tree 2 files changed +52
-21
lines changed Original file line number Diff line number Diff line change 13
13
14
14
#include <zephyr/arch/cpu.h>
15
15
#include <zephyr/toolchain.h>
16
+ #include <zephyr/fatal_types.h>
16
17
17
18
#ifdef __cplusplus
18
19
extern "C" {
@@ -24,27 +25,6 @@ extern "C" {
24
25
* @{
25
26
*/
26
27
27
- enum k_fatal_error_reason {
28
- /** Generic CPU exception, not covered by other codes */
29
- K_ERR_CPU_EXCEPTION ,
30
-
31
- /** Unhandled hardware interrupt */
32
- K_ERR_SPURIOUS_IRQ ,
33
-
34
- /** Faulting context overflowed its stack buffer */
35
- K_ERR_STACK_CHK_FAIL ,
36
-
37
- /** Moderate severity software error */
38
- K_ERR_KERNEL_OOPS ,
39
-
40
- /** High severity software error */
41
- K_ERR_KERNEL_PANIC
42
-
43
- /* TODO: add more codes for exception types that are common across
44
- * architectures
45
- */
46
- };
47
-
48
28
/**
49
29
* @brief Halt the system on a fatal error
50
30
*
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2023 CSIRO.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /** @file
8
+ * @brief Fatal base type definitions
9
+ */
10
+
11
+ #ifndef ZEPHYR_INCLUDE_FATAL_TYPES_H
12
+ #define ZEPHYR_INCLUDE_FATAL_TYPES_H
13
+
14
+ #ifdef __cplusplus
15
+ extern "C" {
16
+ #endif
17
+
18
+ /**
19
+ * @defgroup fatal_types Fatal error base types
20
+ * @ingroup fatal_apis
21
+ * @{
22
+ */
23
+
24
+ enum k_fatal_error_reason {
25
+ /** Generic CPU exception, not covered by other codes */
26
+ K_ERR_CPU_EXCEPTION ,
27
+
28
+ /** Unhandled hardware interrupt */
29
+ K_ERR_SPURIOUS_IRQ ,
30
+
31
+ /** Faulting context overflowed its stack buffer */
32
+ K_ERR_STACK_CHK_FAIL ,
33
+
34
+ /** Moderate severity software error */
35
+ K_ERR_KERNEL_OOPS ,
36
+
37
+ /** High severity software error */
38
+ K_ERR_KERNEL_PANIC ,
39
+
40
+ /* TODO: add more codes for exception types that are common across
41
+ * architectures
42
+ */
43
+ };
44
+
45
+ /** @} */
46
+
47
+ #ifdef __cplusplus
48
+ }
49
+ #endif
50
+
51
+ #endif /* ZEPHYR_INCLUDE_FATAL_TYPES_H */
You can’t perform that action at this time.
0 commit comments