From b5aa407ec2b1bdebc1c950a9428789fe50327776 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Mon, 17 Aug 2009 23:46:30 -0400 Subject: Applied libusb-1.0 patch set from Thomas Tsou : This patch set updates the usrp to support libusb-1.0. Asynchronous I/O through libusb is added with fusb_libusb1.*, which is heavily based on fusb_linux.*. In short, URB's and ioctl calls are replaced with libusb_transfer structs and native calls. Transfer reaping is handled by libusb and associated callbacks. I get 32Mb/s on all of my machines using test_usrp_standard_rx or tx. Due to the API rewrite in 1.0 from 0.12, there are alot of changes, many are simply name changes. Known Issues: Transmit and receive both work, but not at same time (e.g. usrp_benchmark_usb.py). libusb does not create any internal threads, so for a single session fusb_libusb1 works in the same manner as fusb_linux with the callback called at controlled times. With multiple libusb sessions the callback may occur at any time and threading issues come into play causing behavior to become undefined. The use of separate libusb_contexts _might_ solve this issue; I have not had the time to look into it. --- usrp/host/lib/fusb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usrp/host/lib/fusb.cc') diff --git a/usrp/host/lib/fusb.cc b/usrp/host/lib/fusb.cc index 6e4358f5f..ce4bb7aa9 100644 --- a/usrp/host/lib/fusb.cc +++ b/usrp/host/lib/fusb.cc @@ -31,7 +31,7 @@ // device handle // ------------------------------------------------------------------------ -fusb_devhandle::fusb_devhandle (usb_dev_handle *udh) +fusb_devhandle::fusb_devhandle (libusb_device_handle *udh) : d_udh (udh) { // that's it -- cgit From c6f6e69024bd21e99f5f8673dce2399c4bfd8bb8 Mon Sep 17 00:00:00 2001 From: U-CERVELO\ttsou Date: Fri, 11 Sep 2009 15:35:28 -0400 Subject: changes to build on windows / cygwin --- usrp/host/lib/fusb.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usrp/host/lib/fusb.cc') diff --git a/usrp/host/lib/fusb.cc b/usrp/host/lib/fusb.cc index ce4bb7aa9..0bd9ded59 100644 --- a/usrp/host/lib/fusb.cc +++ b/usrp/host/lib/fusb.cc @@ -20,9 +20,9 @@ * Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +//#ifdef HAVE_CONFIG_H +//#include "config.h" +//#endif #include -- cgit From 579c6354514d57d3f1881131203ba6bbd9648816 Mon Sep 17 00:00:00 2001 From: ttsou Date: Mon, 14 Sep 2009 19:50:26 -0400 Subject: Removed preprocessor declrs out of fusb.h and created separate fusb_libusb1_base.h --- usrp/host/lib/fusb.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usrp/host/lib/fusb.cc') diff --git a/usrp/host/lib/fusb.cc b/usrp/host/lib/fusb.cc index 0bd9ded59..992e1a2e9 100644 --- a/usrp/host/lib/fusb.cc +++ b/usrp/host/lib/fusb.cc @@ -20,12 +20,15 @@ * Boston, MA 02110-1301, USA. */ -//#ifdef HAVE_CONFIG_H -//#include "config.h" -//#endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_LIBUSB_1 +#include +#else #include - +#endif // ------------------------------------------------------------------------ // device handle -- cgit From 44269e7b15129102f93131269e7796fde70ddc05 Mon Sep 17 00:00:00 2001 From: ttsou Date: Mon, 14 Sep 2009 21:42:03 -0400 Subject: Moved to single generated fusb.h, headers now generated out of lib directory --- usrp/host/lib/fusb.cc | 4 ---- 1 file changed, 4 deletions(-) (limited to 'usrp/host/lib/fusb.cc') diff --git a/usrp/host/lib/fusb.cc b/usrp/host/lib/fusb.cc index 992e1a2e9..c14d7c1fb 100644 --- a/usrp/host/lib/fusb.cc +++ b/usrp/host/lib/fusb.cc @@ -24,11 +24,7 @@ #include "config.h" #endif -#ifdef HAVE_LIBUSB_1 -#include -#else #include -#endif // ------------------------------------------------------------------------ // device handle -- cgit From f4a86ccaa23e7e513dbbfa45456ea5783c106ec0 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 1 Oct 2009 13:51:03 -0700 Subject: Cleanup in preparation for merge Fix trailing whitespace Use standard include guards Add more missing config.h includes Fixup emacs mode strings Update copyright notices --- usrp/host/lib/fusb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usrp/host/lib/fusb.cc') diff --git a/usrp/host/lib/fusb.cc b/usrp/host/lib/fusb.cc index c14d7c1fb..2a597b67c 100644 --- a/usrp/host/lib/fusb.cc +++ b/usrp/host/lib/fusb.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2003 Free Software Foundation, Inc. + * Copyright 2003,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * -- cgit