v2.0.0
panic.h
1/*
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _PICO_PLATFORM_PANIC_H
8#define _PICO_PLATFORM_PANIC_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#ifndef __ASSEMBLER__
15
20void __attribute__((noreturn)) panic_unsupported(void);
21
31 void __attribute__((noreturn)) panic(const char *fmt, ...);
32
33#ifdef NDEBUG
34#define panic_compact(...) panic(__VA_ARGS__)
35#else
36#define panic_compact(...) panic("")
37#endif
38#endif
39
40#ifdef __cplusplus
41}
42#endif
43
44#endif
panic_unsupported
void panic_unsupported(void)
Panics with the message "Unsupported".
Definition: panic.c:20
panic
void panic(const char *fmt,...)
Displays a panic message and halts execution.