Menu Toggle
v2.3.1 (RP2350)
Toggle main menu visibility
Loading...
Searching...
No Matches
cybt_logging.h
1
/*
2
* Copyright (c) 2025 Raspberry Pi (Trading) Ltd.
3
*
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#ifndef CYBT_LOGGING_H
8
#define CYBT_LOGGING_H
9
10
// Error messages only enabled in debug by default
11
#ifndef CYBT_ERROR_ENABLED
12
#ifndef NDEBUG
13
#define CYBT_ERROR_ENABLED 1
14
#else
15
#define CYBT_ERROR_ENABLED 0
16
#endif
17
#endif
18
19
// Info messages only enabled in debug by default
20
#ifndef CYBT_INFO_ENABLED
21
#ifndef NDEBUG
22
#define CYBT_INFO_ENABLED 1
23
#else
24
#define CYBT_INFO_ENABLED 0
25
#endif
26
#endif
27
28
// Debug messages disabled by default
29
#ifndef CYBT_DEBUG_ENABLED
30
#define CYBT_DEBUG_ENABLED 0
31
#endif
32
33
#ifndef cybt_error
34
#if CYBT_ERROR_ENABLED
35
#define cybt_error CYW43_WARN
36
#else
37
#define cybt_error(...)
38
#endif
39
#endif
40
41
#ifndef cybt_info
42
#if CYBT_INFO_ENABLED
43
#define cybt_info CYW43_PRINTF
44
#else
45
#define cybt_info(...)
46
#endif
47
#endif
48
49
#ifndef cybt_debug
50
#if CYBT_DEBUG_ENABLED
51
#define cybt_debug CYW43_PRINTF
52
#else
53
#define cybt_debug(...)
54
#endif
55
#endif
56
57
#endif
// CYBT_LOGGING_H