summaryrefslogtreecommitdiff
path: root/xpp/astribank_tool.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-03-10 18:48:11 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-03-10 18:48:11 +0000
commit760d0a2a75aba6307550bf551c5eb06174c256b5 (patch)
treed526eeb7d5ce0aec9e4572f5df0cb3536a2632d1 /xpp/astribank_tool.c
parentcf84710ff24dd09e80f9e5ecfeb16ce15137ddc3 (diff)
xpp: use 'xtalk' for the USB access code
* Move most of the USB access code from xpp/ to xpp/xtalk/ . * astribank_tool and such tools can now use a shorter -D mmm/nnn rather than a full path. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9825 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/astribank_tool.c')
-rw-r--r--xpp/astribank_tool.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xpp/astribank_tool.c b/xpp/astribank_tool.c
index 59ae94c..5cf0dc3 100644
--- a/xpp/astribank_tool.c
+++ b/xpp/astribank_tool.c
@@ -28,8 +28,10 @@
#include <getopt.h>
#include <sys/types.h>
#include <arpa/inet.h>
-#include "mpp_funcs.h"
-#include "debug.h"
+#include "astribank_usb.h"
+#include "mpptalk.h"
+#include <debug.h>
+#include <xusb.h>
#define DBG_MASK 0x80
/* if enabled, adds support for resetting pre-MPP USB firmware - if we
@@ -132,7 +134,7 @@ int old_reset(const char* devpath)
DBG("Failed re-opening astribank device for old_reset\n");
return -ENODEV;
}
- ret = send_usb(astribank, buf, 1, 5000);
+ ret = xusb_send(astribank->xusb, buf, 1, 5000);
/* If we just had a reenumeration, we may get -ENODEV */
if(ret < 0 && ret != -ENODEV)
@@ -205,7 +207,7 @@ int main(int argc, char *argv[])
usage();
}
DBG("Startup %s\n", devpath);
- if((astribank = mpp_init(devpath)) == NULL) {
+ if((astribank = mpp_init(devpath, 1)) == NULL) {
ERR("Failed initializing MPP\n");
#ifdef SUPPORT_OLD_RESET
DBG("opt_reset = %s\n", opt_reset);