diff options
Diffstat (limited to 'xpp/xdefs.h')
-rw-r--r-- | xpp/xdefs.h | 15 |
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 */ |