summaryrefslogtreecommitdiff
path: root/xpp/zap_debug.c
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
commit2dd60aaf18e98b0e9d3c06bd9dce5f1128fa55ad (patch)
tree1a1cd28888f191e6ce83bcbbe539124e2529c90b /xpp/zap_debug.c
parent8c4db4e3acd9a7626e709af0494055487b589719 (diff)
xpp driver release 1.1.0 (first part of commit)
* FPGA firmware now loaded from PC (for newer models) * Driver for the FXO module * Moved most userspace files to the subdirectory utils (see also next commit) * Explicit license for firmware files * Optionally avoid auto-registration * Initializations parameters to chips given from userspace * And did I mention bugfixes? git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1021 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/zap_debug.c')
-rw-r--r--xpp/zap_debug.c71
1 files changed, 1 insertions, 70 deletions
diff --git a/xpp/zap_debug.c b/xpp/zap_debug.c
index a5d7915..59eb0a8 100644
--- a/xpp/zap_debug.c
+++ b/xpp/zap_debug.c
@@ -1,6 +1,6 @@
/*
* Written by Oron Peled <oron@actcom.co.il>
- * Copyright (C) 2004-2005, Xorcom
+ * Copyright (C) 2004-2006, Xorcom
*
* All rights reserved.
*
@@ -63,74 +63,5 @@ void dump_poll(int print_dbg, const char *msg, int poll)
}
}
-#define E_(x) [ x ] = { .value = x, .name = #x, }
-static struct {
- int value;
- char *name;
-} zt_event_names[] = {
- E_(ZT_EVENT_NONE),
- E_(ZT_EVENT_ONHOOK),
- E_(ZT_EVENT_RINGOFFHOOK),
- E_(ZT_EVENT_WINKFLASH),
- E_(ZT_EVENT_ALARM),
- E_(ZT_EVENT_NOALARM),
- E_(ZT_EVENT_ABORT),
- E_(ZT_EVENT_OVERRUN),
- E_(ZT_EVENT_BADFCS),
- E_(ZT_EVENT_DIALCOMPLETE),
- E_(ZT_EVENT_RINGERON),
- E_(ZT_EVENT_RINGEROFF),
- E_(ZT_EVENT_HOOKCOMPLETE),
- E_(ZT_EVENT_BITSCHANGED),
- E_(ZT_EVENT_PULSE_START),
- E_(ZT_EVENT_TIMER_EXPIRED),
- E_(ZT_EVENT_TIMER_PING),
- E_(ZT_EVENT_POLARITY)
-};
-#undef E_
-
-char *event2str(int event)
-{
- BUG_ON(event > ARRAY_SIZE(zt_event_names));
- return zt_event_names[event].name;
-}
-
-#define S_(x) [ x ] = { .value = x, .name = #x, }
-static struct {
- int value;
- char *name;
-} zt_sig_types[] = {
- S_(ZT_SIG_NONE),
- S_(ZT_SIG_FXSLS),
- S_(ZT_SIG_FXSGS),
- S_(ZT_SIG_FXSKS),
- S_(ZT_SIG_FXOLS),
- S_(ZT_SIG_FXOGS),
- S_(ZT_SIG_FXOKS),
- S_(ZT_SIG_EM),
- S_(ZT_SIG_CLEAR),
- S_(ZT_SIG_HDLCRAW),
- S_(ZT_SIG_HDLCFCS),
- S_(ZT_SIG_HDLCNET),
- S_(ZT_SIG_SLAVE),
- S_(ZT_SIG_SF),
- S_(ZT_SIG_CAS),
- S_(ZT_SIG_DACS),
- S_(ZT_SIG_EM_E1),
- S_(ZT_SIG_DACS_RBS)
-};
-#undef S_
-
-void dump_sigtype(int print_dbg, const char *msg, int sigtype)
-{
- int i;
-
- for(i = 0; i < ARRAY_SIZE(zt_sig_types); i++) {
- if(sigtype == zt_sig_types[i].value)
- DBG("%s: %s\n", msg, zt_sig_types[i].name);
- }
-}
EXPORT_SYMBOL(dump_poll);
-EXPORT_SYMBOL(event2str);
-EXPORT_SYMBOL(dump_sigtype);