diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:03:01 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:03:01 +0000 |
commit | cf4598d4c53166943c3934ff3773f453dfa077ab (patch) | |
tree | 5542cec9b0d446efceda3321e7b37fbb3496a598 /drivers/dahdi/wctdm24xxp/wctdm24xxp.h | |
parent | ec86ff4339b47717cce4e0f7deb3ca18dc16bc86 (diff) |
wctdm24xxp: Use enumeration for module types.
This change is to primarily to clarify that the types are always mutually
exclusive.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9958 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/wctdm24xxp.h')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index c5e31f4..0063667 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -59,13 +59,6 @@ #define MAX_ALARMS 10 -#define MOD_TYPE_NONE 0 -#define MOD_TYPE_FXS 1 -#define MOD_TYPE_FXO 2 -#define MOD_TYPE_FXSINIT 3 -#define MOD_TYPE_QRV 5 -#define MOD_TYPE_BRI 7 - #define MINPEGTIME 10 * 8 /* 30 ms peak to peak gets us no more than 100 Hz */ #define PEGTIME 50 * 8 /* 50ms peak to peak gets us rings of 10 Hz or more */ #define PEGCOUNT 5 /* 5 cycles of pegging means RING */ @@ -212,6 +205,15 @@ struct qrv { signed short txgain; }; +enum module_type { + NONE = 0, + FXS, + FXO, + FXSINIT, + QRV, + BRI, +}; + struct wctdm_module { union { struct fxo fxo; @@ -222,7 +224,7 @@ struct wctdm_module { struct cmdq cmdq; - int type; /* type of module (FXO/FXS/QRV/etc.) */ + enum module_type type; int sethook; /* pending hook state command */ int dacssrc; int flags; /* bitmap of board-specific + module-specific flags */ |