summaryrefslogtreecommitdiff
path: root/wctdm.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-06-08 18:36:43 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-06-08 18:36:43 +0000
commitfc86f5c437daa269ba6e7d4621b3365a90f5a05d (patch)
tree560e65c53215f6251ae789fa3bd0261d97147e0e /wctdm.c
parent8b3f944271079fca449f3ed155ccd6e9dbc41ff3 (diff)
use proper values for debounce periods (in 4ms increments, not 1ms increments)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@665 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm.c')
-rwxr-xr-xwctdm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/wctdm.c b/wctdm.c
index 9c46f49..153957b 100755
--- a/wctdm.c
+++ b/wctdm.c
@@ -248,9 +248,14 @@ static struct fxo_mode {
#define FLAG_WRITE 1
#define FLAG_READ 2
-#define RING_DEBOUNCE 64 /* Ringer Debounce (in ms) */
-#define DEFAULT_BATT_DEBOUNCE 64 /* Battery debounce (in ms) */
-#define POLARITY_DEBOUNCE 64 /* Polarity debounce (in ms) */
+/* the constants below control the 'debounce' periods enforced by the
+ check_hook routines; these routines are called once every 4 interrupts
+ (the interrupt cycles around the four modules), so the periods are
+ specified in _4 millisecond_ increments
+*/
+#define RING_DEBOUNCE 16 /* Ringer Debounce (64 ms) */
+#define DEFAULT_BATT_DEBOUNCE 16 /* Battery debounce (64 ms) */
+#define POLARITY_DEBOUNCE 16 /* Polarity debounce (64 ms) */
#define DEFAULT_BATT_THRESH 3 /* Anything under this is "no battery" */
#define OHT_TIMER 6000 /* How long after RING to retain OHT */