Epicardium Internal APIs

Core OS APIs


Panicking should be used in situations where no automatic recovery is possible of where a fatal bug was detected. Calling panic() will show a message on the screen and serial console and then reboot the device.

Keep in mind that screen space is limited and thus the message should be as concise as possible.

void panic(const char *format, ...)

Trigger a firmware panic.

This function will not return but instead reboot the device. No synchronization of e.g. the filesystem is done so this could potentially lead to data loss.


All logging macros take a “subsystem” and a log message. This subsystem argument should be used to uniquely identify where a message came from.


        "Failed reading battery voltage: %s (%d)",
LOG_INFO(subsys, format, ...)
LOG_WARN(subsys, format, ...)
LOG_ERR(subsys, format, ...)
LOG_CRIT(subsys, format, ...)
LOG_DEBUG(subsys, format, ...)

Only prints when debug logging is enabled in the meson configuration.