Idefisk
Tools
Tutorials
Reviews
VoIP Providers
Archives
AsteriskGuru Archives
Mailing List Archives
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
[Asterisk-cvs] zaptel wct4xxp.c,1.7,1.8
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
View previous topic
::
View next topic
Author
Message
markster at lists.digium.
Guest
Posted: Thu Sep 25, 2003 3:29 pm
Post subject: [Asterisk-cvs] zaptel wct4xxp.c,1.7,1.8
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv31633
Modified Files:
wct4xxp.c
Log Message:
Update pulse templates for non-standard LBO's
Index: wct4xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct4xxp.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- wct4xxp.c 25 Sep 2003 06:07:28 -0000 1.7
+++ wct4xxp.c 25 Sep 2003 15:30:57 -0000 1.8
@@ -58,6 +58,7 @@
static int timingcable;
static int highestorder;
static int t1e1override = -1;
+static int loopback = 0;
#ifdef FANCY_ALARM
static int altab[] = {
@@ -642,6 +643,8 @@
mytxlevel = txlevel - 4;
fmr1 = 0x9c; /* FMR1: Mode 1, T1 mode, CRC on for ESF, 8.192 Mhz system data rate, no XAIS */
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 */
lim2 = 0x21; /* LIM2: 50% peak is a "1", Advanced Loss recovery */
lim2 |= (mytxlevel << 6); /* LIM2: Add line buildout */
@@ -678,9 +681,29 @@
__t4_framer_out(wc, unit, 0x39, 0x15); /* PCR: 22 "ones" clear LOS */
/* Generate pulse mask for T1 */
- __t4_framer_out(wc, unit, 0x26, 0xd7); /* XPM0 */
- __t4_framer_out(wc, unit, 0x27, 0x22); /* XPM1 */
- __t4_framer_out(wc, unit, 0x28, 0x01); /* XPM2 */
+ switch(mytxlevel) {
+ case 3:
+ __t4_framer_out(wc, unit, 0x26, 0x07); /* XPM0 */
+ __t4_framer_out(wc, unit, 0x27, 0x01); /* XPM1 */
+ __t4_framer_out(wc, unit, 0x28, 0x00); /* XPM2 */
+ break;
+ case 2:
+ __t4_framer_out(wc, unit, 0x26, 0x8c); /* XPM0 */
+ __t4_framer_out(wc, unit, 0x27, 0x11); /* XPM1 */
+ __t4_framer_out(wc, unit, 0x28, 0x01); /* XPM2 */
+ break;
+ case 1:
+ __t4_framer_out(wc, unit, 0x26, 0x8c); /* XPM0 */
+ __t4_framer_out(wc, unit, 0x27, 0x01); /* XPM1 */
+ __t4_framer_out(wc, unit, 0x28, 0x00); /* XPM2 */
+ break;
+ case 0:
+ default:
+ __t4_framer_out(wc, unit, 0x26, 0xd7); /* XPM0 */
+ __t4_framer_out(wc, unit, 0x27, 0x22); /* XPM1 */
+ __t4_framer_out(wc, unit, 0x28, 0x01); /* XPM2 */
+ break;
+ }
printk("TE410P: Span %d configured for %s/%s\n", unit + 1, framing, line);
}
@@ -690,7 +713,9 @@
char *crc4 = "";
char *framing, *line;
fmr1 = 0x44; /* FMR1: E1 mode, Automatic force resync, PCM30 mode, 8.192 Mhz backplane, no XAIS */
- fmr2 = 0x03 /* | 0x4 */; /* FMR2: Auto transmit remote alarm, auto loss of multiframe recovery, no payload loopback */
+ fmr2 = 0x03; /* FMR2: Auto transmit remote alarm, auto loss of multiframe recovery, no payload loopback */
+ if (loopback)
+ fmr2 |= 0x4;
if (lineconfig & ZT_CONFIG_CRC4) {
fmr1 |= 0x08; /* CRC4 transmit */
fmr2 |= 0xc0; /* CRC4 receive */
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
All times are GMT
Page
1
of
1
Jump to:
Select a forum
Asterisk Mailing Lists
----------------
Asterisk-Users
Asterisk-Dev
Asterisk-CVS
Asterisk-Biz
Asterisk-Doc
Asterisk-BSD
Asterisk-Announce
Asterisk Call Centers
Asterisk-Video
Asterisk-Speech-Rec
Bristuff-Users
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group