diff options
Diffstat (limited to 'xpp/xdefs.h')
-rw-r--r-- | xpp/xdefs.h | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/xpp/xdefs.h b/xpp/xdefs.h index 8c902bd..c69b8a9 100644 --- a/xpp/xdefs.h +++ b/xpp/xdefs.h @@ -2,7 +2,7 @@ #define XDEFS_H /* * Written by Oron Peled <oron@actcom.co.il> - * Copyright (C) 2004-2005, Xorcom + * Copyright (C) 2004-2006, Xorcom * * All rights reserved. * @@ -26,15 +26,10 @@ #include <linux/kernel.h> -#define DBG(fmt, ...) \ - ((print_dbg) && printk(KERN_DEBUG "DBG-%s: %s: " fmt, \ - THIS_MODULE->name, __FUNCTION__, ## __VA_ARGS__)) -#define INFO(fmt, ...) printk(KERN_INFO "INFO-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__) -#define NOTICE(fmt, ...) printk(KERN_NOTICE "NOTICE-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__) -#define ERR(fmt, ...) printk(KERN_ERR "ERR-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__) - #else +/* This is to enable user-space programs to include this. */ + #include <stdint.h> typedef uint32_t __u32; @@ -57,26 +52,17 @@ typedef struct xbus xbus_t; typedef struct xpd xpd_t; typedef struct xpacket_raw xpacket_raw_t; typedef struct xpacket xpacket_t; -typedef struct xops xops_t; -typedef __u32 xpp_line_t; /* at most 31 lines for E1 */ +typedef struct xops xops_t; +typedef __u32 xpp_line_t; /* at most 31 lines for E1 */ +typedef int lineno_t; +#define ALL_LINES ((lineno_t)-1) -#define BIT_SET(x,i) ((x) |= (1 << (i))) -#define BIT_CLR(x,i) ((x) &= ~(1 << (i))) -#define IS_SET(x,i) (((x) & (1 << (i))) != 0) #define BIT(i) (1 << (i)) +#define BIT_SET(x,i) ((x) |= BIT(i)) +#define BIT_CLR(x,i) ((x) &= ~BIT(i)) +#define IS_SET(x,i) (((x) & BIT(i)) != 0) -#undef SUPPORT_USB1 - -#ifdef SUPPORT_USB1 -/* - * packet size <= 64 bytes: - * ZT_CHUNKSIZE * 7 channels + header size <= 64 - */ -#define CHANNELS_PERXPD 7 /* 7 * ZT_CHUNKSIZE + header <= 64 bytes */ -#else #define CHANNELS_PERXPD 30 /* Depends on xpp_line_t and protocol fields */ -#endif - #endif /* XDEFS_H */ |