diff options
-rw-r--r-- | core/cortex-m/panic.c | 6 | ||||
-rw-r--r-- | include/panic.h | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c index 1c9629eff3..3099887dcb 100644 --- a/core/cortex-m/panic.c +++ b/core/cortex-m/panic.c @@ -372,3 +372,9 @@ void panic_assert_fail(const char *msg, const char *func, const char *fname, panic_reboot(); } #endif + + +void panic(const char *msg) +{ + report_panic(msg, NULL); +} diff --git a/include/panic.h b/include/panic.h index 2bef50f541..f42a399efa 100644 --- a/include/panic.h +++ b/include/panic.h @@ -69,6 +69,13 @@ void panic_assert_fail(const char *msg, const char *func, const char *fname, int linenum); /** + * Display a panic message and reset + * + * @param msg Panic message + */ +void panic(const char *msg); + +/** * Report a panic to the panic reporting device * * This is exported only to permit use from assembler. |