[Asterisk-cvs] zaptel wcfxs.c,1.59,1.60
markster at lists.digium.com
markster at lists.digium.com
Tue May 18 21:05:46 CDT 2004
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv19922
Modified Files:
wcfxs.c
Log Message:
Work around issues with slot 1 FXO's
Index: wcfxs.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxs.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- wcfxs.c 15 May 2004 22:19:51 -0000 1.59
+++ wcfxs.c 19 May 2004 01:18:03 -0000 1.60
@@ -132,7 +132,7 @@
#define FLAG_READ 2
#define RING_DEBOUNCE 64 /* Ringer Debounce (in ms) */
-#define BATT_DEBOUNCE 8 /* Battery debounce (in ms) */
+#define BATT_DEBOUNCE 64 /* Battery debounce (in ms) */
#define BATT_THRESH 3 /* Anything under this is "no battery" */
#define OHT_TIMER 6000 /* How long after RING to retain OHT */
@@ -1234,6 +1234,20 @@
}
}
#endif
+ /* Try to track issues that plague slot one FXO's */
+ b = wcfxs_getreg(wc, card, 5);
+ if ((b & 0x2) || !(b & 0x8)) {
+ /* Not good -- don't look at anything else */
+ return;
+ }
+ b &= 0x9;
+ if (wc->mod.fxo.offhook[card]) {
+ if (b != 0x9)
+ wcfxs_setreg(wc, card, 5, 0x9);
+ } else {
+ if (b != 0x8)
+ wcfxs_setreg(wc, card, 5, 0x8);
+ }
b = wcfxs_getreg(wc, card, 29);
#if 0
{
More information about the svn-commits
mailing list