summaryrefslogtreecommitdiff
path: root/xpp/xdefs.h
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-28 13:36:03 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-28 13:36:03 +0000
commitd8bdfe8d82cf7c57b2a4061fc03b6e0a863064e1 (patch)
treeb67e786e441a4b6951e05552d533a924d5dacccf /xpp/xdefs.h
parent6ecdbe426f0630c1ffb85e5e93758ae3e53aba22 (diff)
r1557@boole: tzafrir | 2006-11-06 20:12:16 +0200
Merging xpp driver release 1.2 (rev. 2569), originally team/tzafrir/xpp_1.2 * Should build well. Almost final. * genzaptelconf: Also work when zap_autoreg=0 * README.Astribank updated for rev. 1.2. * xpp/utils/Makefile: Use $< with cc -c * Get xpp/utils configuration from autoconf (without changesin top dir) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1648 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xdefs.h')
-rw-r--r--xpp/xdefs.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/xpp/xdefs.h b/xpp/xdefs.h
index ab3670e..d7c7032 100644
--- a/xpp/xdefs.h
+++ b/xpp/xdefs.h
@@ -67,11 +67,11 @@ struct list_head { struct list_head *next; struct list_head *prev; };
#define XBUS_NAMELEN 20 /* must be <= from maximal workqueue name */
#define XBUS_DESCLEN 40
-#define UNIT_BITS 4 /* Bit for Astribank unit number */
-#define SUBUNIT_BITS 4 /* Bit for Astribank subunit number */
+#define UNIT_BITS 3 /* Bit for Astribank unit number */
+#define SUBUNIT_BITS 3 /* Bit for Astribank subunit number */
-#define MAX_UNIT 4 /* 1 FXS + 3 FXS/FXO */
-#define MAX_SUBUNIT 1 /* Firmware does not support subunits yet */
+#define MAX_UNIT BIT(UNIT_BITS) /* 1 FXS + 3 FXS/FXO | 1 BRI + 3 FXS/FXO */
+#define MAX_SUBUNIT BIT(SUBUNIT_BITS) /* 8 port BRI */
/*
* Compile time sanity checks
@@ -88,6 +88,11 @@ struct list_head { struct list_head *next; struct list_head *prev; };
#define VALID_XPD_NUM(x) ((x) < MAX_XPDS && (x) >= 0)
+#define CHAN_BITS 5 /* 0-30 for E1, 31 = ALL_CHANS */
+#define ALL_CHANS BITMASK(CHAN_BITS)
+#define MAX_CHAN (ALL_CHANS - 1)
+#define VALID_CHAN_NUM(x) ((x) < MAX_CHAN)
+
typedef char *charp;
typedef unsigned char byte;
typedef int bool;
@@ -97,7 +102,7 @@ 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 int lineno_t;
+typedef byte lineno_t;
#endif /* XDEFS_H */