summaryrefslogtreecommitdiff
path: root/wcte11xp.c
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-04-03 06:13:01 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-04-03 06:13:01 +0000
commitb25a381c4c03266998a75e1079afc9c6435cc6b8 (patch)
treef0dc2bbcd75f65caf984256aac3ca21269402f80 /wcte11xp.c
parent9afbefef75a4345fc5d3280b29fae87ae8f972ee (diff)
J1 mode changes
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@614 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcte11xp.c')
-rwxr-xr-xwcte11xp.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/wcte11xp.c b/wcte11xp.c
index ccc6d3e..aaf78f6 100755
--- a/wcte11xp.c
+++ b/wcte11xp.c
@@ -178,6 +178,7 @@ struct t1 {
#define CANARY 0xca1e
static int debug = 0; /* doesnt do anything */
+static int j1mode = 0;
static int alarmdebounce = 0;
static int loopback = 0;
static int clockextra = 0;
@@ -699,7 +700,13 @@ static void __t1_configure_t1(struct t1 *wc, int lineconfig, int txlevel)
fmr2 = 0x22; /* FMR2: no payload loopback, auto send yellow alarm */
if (loopback)
fmr2 |= 0x4;
- fmr4 = 0x0c; /* FMR4: Lose sync on 2 out of 5 framing bits, auto resync */
+
+ if (j1mode)
+ fmr4 = 0x1c;
+ else
+ fmr4 = 0x0c; /* FMR4: Lose sync on 2 out of 5 framing bits, auto resync */
+
+
lim2 = 0x21; /* LIM2: 50% peak is a "1", Advanced Loss recovery */
lim2 |= (mytxlevel << 6); /* LIM2: Add line buildout */
__t1_framer_out(wc, 0x1d, fmr1);
@@ -721,6 +728,7 @@ static void __t1_configure_t1(struct t1 *wc, int lineconfig, int txlevel)
fmr2 |= 0xc0;
}
__t1_framer_out(wc, 0x1c, fmr0);
+
__t1_framer_out(wc, 0x20, fmr4);
__t1_framer_out(wc, 0x21, 0x40); /* FMR5: Enable RBS mode */
@@ -733,6 +741,9 @@ static void __t1_configure_t1(struct t1 *wc, int lineconfig, int txlevel)
__t1_framer_out(wc, 0x3a, lim2); /* LIM2: 50% peak amplitude is a "1" */
__t1_framer_out(wc, 0x38, 0x0a); /* PCD: LOS after 176 consecutive "zeros" */
__t1_framer_out(wc, 0x39, 0x15); /* PCR: 22 "ones" clear LOS */
+
+ if (j1mode)
+ __t1_framer_out(wc, 0x24, 0x80); /* J1 overide */
/* Generate pulse mask for T1 */
switch(mytxlevel) {
@@ -1570,12 +1581,14 @@ module_param(loopback, int, 0600);
module_param(t1e1override, int, 0600);
module_param(clockextra, int, 0600);
module_param(debug, int, 0600);
+module_param(j1mode, int, 0600);
#else
MODULE_PARM(alarmdebounce, "i");
MODULE_PARM(loopback, "i");
MODULE_PARM(t1e1override, "i");
MODULE_PARM(clockextra, "i");
MODULE_PARM(debug, "i");
+MODULE_PARM(j1mode, "i");
#endif
MODULE_DESCRIPTION("Wildcard T100P/E100P Zaptel Driver");
MODULE_AUTHOR("Mark Spencer <markster@linux-support.net>");