diff options
Diffstat (limited to 'include/dahdi')
-rw-r--r-- | include/dahdi/kernel.h | 10 | ||||
-rw-r--r-- | include/dahdi/user.h | 7 |
2 files changed, 13 insertions, 4 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 1fe579b..911db1f 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -419,12 +419,14 @@ int dahdi_register_chardev(struct dahdi_chardev *dev); int dahdi_unregister_chardev(struct dahdi_chardev *dev); /*! \brief defines for transmit signalling */ -typedef enum { +enum dahdi_txsig { DAHDI_TXSIG_ONHOOK, /*!< On hook */ DAHDI_TXSIG_OFFHOOK, /*!< Off hook */ DAHDI_TXSIG_START, /*!< Start / Ring */ - DAHDI_TXSIG_KEWL /*!< Drop battery if possible */ -} dahdi_txsig_t; + DAHDI_TXSIG_KEWL, /*!< Drop battery if possible */ + /*! Leave this as the last entry */ + DAHDI_TXSIG_TOTAL, +}; typedef enum { DAHDI_RXSIG_ONHOOK, @@ -575,7 +577,7 @@ struct dahdi_span { generate ring, etc directly) then you can just specify a sethook function, and we'll call you with appropriate hook states to set. Still set the DAHDI_FLAG_RBS in this case as well */ - int (*hooksig)(struct dahdi_chan *chan, dahdi_txsig_t hookstate); + int (*hooksig)(struct dahdi_chan *chan, enum dahdi_txsig hookstate); /*! Option 3: If you can't use sig bits, you can write a function which handles the individual hook states */ diff --git a/include/dahdi/user.h b/include/dahdi/user.h index fcddb68..c5d431e 100644 --- a/include/dahdi/user.h +++ b/include/dahdi/user.h @@ -91,6 +91,13 @@ #define DAHDI_CBIT (1 << 1) #define DAHDI_DBIT (1 << 0) +#define DAHDI_BITS_ABCD (DAHDI_ABIT | DAHDI_BBIT | DAHDI_CBIT | DAHDI_DBIT) +#define DAHDI_BITS_ABD (DAHDI_ABIT | DAHDI_BBIT | DAHDI_DBIT) +#define DAHDI_BITS_ACD (DAHDI_ABIT | DAHDI_CBIT | DAHDI_DBIT) +#define DAHDI_BITS_BCD (DAHDI_BBIT | DAHDI_CBIT | DAHDI_DBIT) +#define DAHDI_BITS_AC (DAHDI_ABIT | DAHDI_CBIT) +#define DAHDI_BITS_BD (DAHDI_BBIT | DAHDI_DBIT) + #define DAHDI_MAJOR 196 #define DAHDI_MAX_BLOCKSIZE 8192 |