[Asterisk-cvs] zaptel tor2.c,1.2,1.3

markster at lists.digium.com markster at lists.digium.com
Tue Sep 23 11:03:36 CDT 2003


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv17800

Modified Files:
	tor2.c 
Log Message:
Apply tcr2 fix to tor2, too


Index: tor2.c
===================================================================
RCS file: /usr/cvsroot/zaptel/tor2.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tor2.c	18 Jul 2003 18:54:03 -0000	1.2
+++ tor2.c	23 Sep 2003 16:04:45 -0000	1.3
@@ -792,7 +792,7 @@
 		p->tor->syncsrc = -1;
 
 	if (p->tor->cardtype == TYPE_E1) { /* if this is an E1 card */
-		unsigned char tcr1,ccr1;
+		unsigned char tcr1,ccr1,tcr2;
 		if (!alreadyrunning) {
 			p->tor->mem8[SYNCREG] = SYNCSELF;
 			p->tor->mem8[CTLREG] = E1DIV;
@@ -821,6 +821,7 @@
 		ccr1 = 0;
 		crcing = "";
 		tcr1 = 9; /* base TCR1 value: TSis mode */
+		tcr2 = 0;
 		if (span->lineconfig & ZT_CONFIG_CCS) {
 			ccr1 |= 8; /* CCR1: Rx Sig mode: CCS */
 			coding = "CCS";
@@ -834,9 +835,11 @@
 		} else framing = "AMI";
 		if (span->lineconfig & ZT_CONFIG_CRC4) {
 			ccr1 |= 0x11; /* CCR1: TX and TX CRC4 */
+			tcr2 |= 0x02; /* TCR2: CRC4 bit auto */
 			crcing = "/CRC4";
 		} 
 		t1out(p->tor,tspan,0x12,tcr1);
+		t1out(p->tor,tspan,0x13,tcr2);
 		t1out(p->tor,tspan,0x14,ccr1);
 		t1out(p->tor,tspan, 0x18, 0x20); /* 120 Ohm, normal */
 




More information about the svn-commits mailing list