source: GPL/branches/uniaud32-2.1.x/include/dbgos2.h@ 519

Last change on this file since 519 was 519, checked in by David Azarewicz, 15 years ago

Changes to PCI bus scan, malloc, cleanup all warnings, misc other changes

File size: 1.8 KB
Line 
1/* $Id: dbgos2.h,v 1.2 2003/08/08 15:09:03 vladest Exp $ */
2/*
3 * Header for debug functions
4 *
5 * (C) 2000-2002 InnoTek Systemberatung GmbH
6 * (C) 2000-2001 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
21 * USA.
22 *
23 */
24
25#ifndef __COMMDBG_H__
26#define __COMMDBG_H__
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31extern int DebugLevel;
32extern int wrOffset;
33extern char *szprintBuf;
34//void _cdecl DPE(char *x, ...) ; /* not debugging: nothing */
35int _cdecl printk(const char * fmt, ...);
36#ifdef __cplusplus
37}
38#endif
39
40
41/* rprintf always prints to the log buffer, and to SIO if enabled */
42#define rprintf(a) printk a
43
44/* the dprintf functions only print if DEBUG is defined */
45#ifdef DEBUG
46#define DBG_MAX_BUF_SIZE 0x100000
47#define dprintf(a) printk a
48#define dprintf1(a) if(DebugLevel > 0) printk a
49#define dprintf2(a) if(DebugLevel > 1) printk a
50#define dprintf3(a) if(DebugLevel > 2) printk a
51#define DebugInt3() ; //_asm int 3
52//#define DebInt3() _asm int 3;
53#else
54// not DEBUG
55#define DBG_MAX_BUF_SIZE 0x10000
56#define dprintf(a)
57#define dprintf1(a)
58#define dprintf2(a)
59#define dprintf3(a)
60#define DebugInt3()
61#endif
62
63#endif //__COMMDBG_H__
64
Note: See TracBrowser for help on using the repository browser.