summaryrefslogtreecommitdiff
path: root/xpp/xdefs.h
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
commit2dd60aaf18e98b0e9d3c06bd9dce5f1128fa55ad (patch)
tree1a1cd28888f191e6ce83bcbbe539124e2529c90b /xpp/xdefs.h
parent8c4db4e3acd9a7626e709af0494055487b589719 (diff)
xpp driver release 1.1.0 (first part of commit)
* FPGA firmware now loaded from PC (for newer models) * Driver for the FXO module * Moved most userspace files to the subdirectory utils (see also next commit) * Explicit license for firmware files * Optionally avoid auto-registration * Initializations parameters to chips given from userspace * And did I mention bugfixes? git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1021 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xdefs.h')
-rw-r--r--xpp/xdefs.h34
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 */