summaryrefslogtreecommitdiff
path: root/usrp/host/lib/usrp_primsi.h
diff options
context:
space:
mode:
authorJohnathan Corgan2009-10-01 14:24:08 -0700
committerJohnathan Corgan2009-10-01 14:24:08 -0700
commit0cd478fdc090123e09b7ee21c88e5657abab8ae0 (patch)
tree901fcd8cda2ae27e28c20fc2659759fa71984b0d /usrp/host/lib/usrp_primsi.h
parentbf76534044a1bbcc665f0400a53d1070cae8caf0 (diff)
parentf4a86ccaa23e7e513dbbfa45456ea5783c106ec0 (diff)
downloadgnuradio-0cd478fdc090123e09b7ee21c88e5657abab8ae0.tar.gz
gnuradio-0cd478fdc090123e09b7ee21c88e5657abab8ae0.tar.bz2
gnuradio-0cd478fdc090123e09b7ee21c88e5657abab8ae0.zip
Merge branch 'wip/libusb-1.0' of http://gnuradio.org/git/jcorgan into master
This merge adds support for libusb1.0 in the usrp component. To enable, you must add --with-fusb-tech=libusb1 to your configure command line. Existing support for libusb0.1 is retained, no changes are needed. Most of the work was done here by Thomas Tsou. * 'wip/libusb-1.0' of http://gnuradio.org/git/jcorgan: (32 commits) Cleanup in preparation for merge Add required include directory for new header organization Added config.h headers to fix win32 build Consolidate conditional headers into libusb_types.h, use automake Change write_internal_ram in usrp_prims to print signed error code Allow fusb_sysconfig to build on non-linux libusb-0.12 impls Comments for usrp_prims Removed internal functions from external header file Moved to single generated fusb.h, headers now generated out of lib directory Added copyright header Removed preprocessor declrs out of fusb.h and created separate fusb_libusb1_base.h Fixed libusb1 configure bug, libusb1 updates for previous usrp_prims integration Commonized more usrp_prims code and renamed libusb-0.12 files to libusb0 Fixed bug usb_control_transfer bug Combined additiona usrp_prims code Fix glitch from previous commit changes to build on windows / cygwin Re-added non pkgconfig support for libusb Autoconf support for checking the required version of libusb based on fusb-tech Use default arguments instead of overloaded virtual constructors for cleaner interface ...
Diffstat (limited to 'usrp/host/lib/usrp_primsi.h')
-rw-r--r--usrp/host/lib/usrp_primsi.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/usrp/host/lib/usrp_primsi.h b/usrp/host/lib/usrp_primsi.h
new file mode 100644
index 000000000..b1cf7263a
--- /dev/null
+++ b/usrp/host/lib/usrp_primsi.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2003,2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * Internal usrp_prims header file
+ */
+
+#ifndef _USRP_PRIMSI_H_
+#define _USRP_PRIMSI_H_
+
+#include "usrp/usrp_prims.h"
+
+/*
+ * Internal functions
+ */
+
+libusb_device_handle *
+usrp_open_interface(libusb_device *dev, int interface, int altinterface);
+
+int write_cmd (libusb_device_handle *udh, int request, int value, int index,
+ unsigned char *bytes, int len);
+
+/*
+ * Compatibility functions
+ */
+
+libusb_device *_get_usb_device (libusb_device_handle *udh);
+
+libusb_device_descriptor _get_usb_device_descriptor (libusb_device *q);
+
+int _get_usb_string_descriptor (libusb_device_handle *udh, int index,
+ unsigned char* data, int length);
+
+int _usb_control_transfer (libusb_device_handle *udh, int request_type,
+ int request, int value, int index,
+ unsigned char *data, int length,
+ unsigned int timeout);
+
+#endif /* _USRP_PRIMSI_H_ */
+