summaryrefslogtreecommitdiff
path: root/usrp/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usrp/host/lib')
-rw-r--r--usrp/host/lib/Makefile.am8
-rw-r--r--usrp/host/lib/usrp_prims_common.cc2
-rw-r--r--usrp/host/lib/usrp_prims_libusb0.cc2
-rw-r--r--usrp/host/lib/usrp_prims_libusb1.cc2
-rw-r--r--usrp/host/lib/usrp_primsi.h59
5 files changed, 68 insertions, 5 deletions
diff --git a/usrp/host/lib/Makefile.am b/usrp/host/lib/Makefile.am
index 16f53bd38..4c37a8f15 100644
--- a/usrp/host/lib/Makefile.am
+++ b/usrp/host/lib/Makefile.am
@@ -78,7 +78,10 @@ darwin_CODE = \
circular_buffer.h \
circular_linked_list.h \
darwin_libusb.h \
- mld_threads.h
+ mld_threads.h \
+ usrp_prims_libusb0.cc \
+ usrp_basic_libusb0.cc
+
win32_CODE = \
fusb_win32.cc \
@@ -178,7 +181,8 @@ noinst_HEADERS = \
fusb_win32.h \
md5.h \
rate_to_regval.h \
- usrp_config.h
+ usrp_config.h \
+ usrp_primsi.h
if PYTHON
usrppython_PYTHON = \
diff --git a/usrp/host/lib/usrp_prims_common.cc b/usrp/host/lib/usrp_prims_common.cc
index 41722b23b..c55098dc3 100644
--- a/usrp/host/lib/usrp_prims_common.cc
+++ b/usrp/host/lib/usrp_prims_common.cc
@@ -30,7 +30,7 @@
#include <usb.h>
#endif
-#include "usrp/usrp_prims.h"
+#include "usrp_primsi.h"
#include "usrp_commands.h"
#include "usrp_ids.h"
#include "usrp_i2c_addr.h"
diff --git a/usrp/host/lib/usrp_prims_libusb0.cc b/usrp/host/lib/usrp_prims_libusb0.cc
index 7ff831064..23d278fe8 100644
--- a/usrp/host/lib/usrp_prims_libusb0.cc
+++ b/usrp/host/lib/usrp_prims_libusb0.cc
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include "usrp/usrp_prims.h"
+#include "usrp_primsi.h"
#include "usrp_commands.h"
#include <usb.h>
#include <errno.h>
diff --git a/usrp/host/lib/usrp_prims_libusb1.cc b/usrp/host/lib/usrp_prims_libusb1.cc
index b7eba87ea..0b514e97f 100644
--- a/usrp/host/lib/usrp_prims_libusb1.cc
+++ b/usrp/host/lib/usrp_prims_libusb1.cc
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include "usrp/usrp_prims.h"
+#include "usrp_primsi.h"
#include "usrp_commands.h"
#include <libusb-1.0/libusb.h>
#include <errno.h>
diff --git a/usrp/host/lib/usrp_primsi.h b/usrp/host/lib/usrp_primsi.h
new file mode 100644
index 000000000..83cc31aee
--- /dev/null
+++ b/usrp/host/lib/usrp_primsi.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2003 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_ */
+