From 760d0a2a75aba6307550bf551c5eb06174c256b5 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Thu, 10 Mar 2011 18:48:11 +0000 Subject: 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 Acked-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9825 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- xpp/astribank_tool.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'xpp/astribank_tool.c') 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 #include #include -#include "mpp_funcs.h" -#include "debug.h" +#include "astribank_usb.h" +#include "mpptalk.h" +#include +#include #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); -- cgit v1.2.3