summaryrefslogtreecommitdiff
path: root/firmware/export/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/debug.h')
-rw-r--r--firmware/export/debug.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/firmware/export/debug.h b/firmware/export/debug.h
new file mode 100644
index 0000000000..f8aa7d4113
--- /dev/null
+++ b/firmware/export/debug.h
@@ -0,0 +1,51 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef DEBUG_H
20#define DEBUG_H
21
22extern void debug_init(void);
23extern void debugf(char* fmt,...);
24extern void ldebugf(char* file, int line, char *fmt, ...);
25
26#ifdef __GNUC__
27
28/* */
29#if defined(SIMULATOR)
30#define DEBUGF debugf
31#define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__)
32#else
33#if defined(DEBUG)
34#define DEBUGF debugf
35#define LDEBUGF debugf
36#else
37#define DEBUGF(...)
38#define LDEBUGF(...)
39#endif
40#endif
41
42
43#else
44
45#define DEBUGF debugf
46#define LDEBUGF debugf
47
48#endif /* GCC */
49
50
51#endif