Xenomai  3.0.8
rtcfg.h
1 /***
2  *
3  * include/rtcfg/rtcfg.h
4  *
5  * Real-Time Configuration Distribution Protocol
6  *
7  * Copyright (C) 2003-2005 Jan Kiszka <jan.kiszka@web.de>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22  *
23  */
24 
25 #ifndef __RTCFG_H_INTERNAL_
26 #define __RTCFG_H_INTERNAL_
27 
28 #include <rtdm/driver.h>
29 
30 
31 #define MIN(a, b) ((a) < (b) ? (a) : (b))
32 
33 
34 /***
35  * RTcfg debugging
36  */
37 #ifdef CONFIG_XENO_DRIVERS_NET_RTCFG_DEBUG
38 
39 extern int rtcfg_debug;
40 
41 /* use 0 for production, 1 for verification, >2 for debug */
42 #define RTCFG_DEFAULT_DEBUG_LEVEL 10
43 
44 #define RTCFG_DEBUG(n, args...) (rtcfg_debug >= (n)) ? (rtdm_printk(args)) : 0
45 #else
46 #define RTCFG_DEBUG(n, args...)
47 #endif /* CONFIG_RTCFG_DEBUG */
48 
49 #endif /* __RTCFG_H_INTERNAL_ */
Real-Time Driver Model for Xenomai, driver API header.