diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-07-08 00:43:31 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-07-08 00:43:31 +0000 |
commit | ec6b220aa7a334ccbd0fcb41d35c66560fc78a11 (patch) | |
tree | 8ee3f2338f95b3fa67f8512adb8fe4842643c391 /xpp/zap_debug.c | |
parent | 4e4b79bf56f6477b65973c869e5a8936aea27864 (diff) |
xpp Release 1.1.0 :
* FPGA firmware now loaded from PC (for newer models)
* Driver for the FXO module (xpd_fxo.ko)
* Moved most userspace files to the subdirectory utils (see also next commit)
* Explicit license for firmware files
* Optionally avoid auto-registration
* Registers initializations code is done by a userspace script.
* Remove obsolete .inc initialization files (we use user-space init)
* Added an install target to the utils dir.
* Updated README.Astribank accordingly.
* Using RBS signalling, as caller ID did not work well otherwise.
* Better handling of USB protocol errors.
* Fixed some procfs-related races.
* per-card-module ioctls.
* fxotune support.
* opermode support (set through /etc/default/zaptel for now)
* Userspace initialization script can also read registers.
* Power calibration works (and implemented in perl)
* some fine-tuning to the regster initialization parameters.
* Leds turn on before registration and turn off after it.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1212 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/zap_debug.c')
-rw-r--r-- | xpp/zap_debug.c | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/xpp/zap_debug.c b/xpp/zap_debug.c index a5d7915..f20e14d 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. * @@ -28,7 +28,7 @@ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/module.h> -#include <zaptel.h> +#include "zaptel.h" #include "zap_debug.h" static const char rcsid[] = "$Id$"; @@ -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); |