mrubyvisor/src/panic.c

17 lines
303 B
C
Raw Permalink Normal View History

2022-11-29 13:19:03 +00:00
#include "logger.h"
#include "panic.h"
2022-12-03 18:48:32 +00:00
#include <drivers/shutdown.h>
2022-12-22 16:16:42 +00:00
#include <kernaux/runtime.h>
2022-11-29 13:19:03 +00:00
void panic_init()
{
kernaux_assert_cb = assert;
}
void assert(const char *const file, const int line, const char *const str)
{
logger_assert(file, line, str);
2022-12-03 18:48:32 +00:00
drivers_shutdown_poweroff();
2022-11-29 13:19:03 +00:00
}