From 889a053c6171a6bc6746aa4e36056a073e8bec4f Mon Sep 17 00:00:00 2001 From: ttsou Date: Tue, 15 Sep 2009 20:28:04 -0400 Subject: [PATCH] Removed internal functions from external header file --- usrp/host/lib/Makefile.am | 8 +++- usrp/host/lib/usrp_prims_common.cc | 2 +- usrp/host/lib/usrp_prims_libusb0.cc | 2 +- usrp/host/lib/usrp_prims_libusb1.cc | 2 +- usrp/host/lib/usrp_primsi.h | 59 +++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 usrp/host/lib/usrp_primsi.h diff --git a/usrp/host/lib/Makefile.am b/usrp/host/lib/Makefile.am index 16f53bd3..4c37a8f1 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 41722b23..c55098dc 100644 --- a/usrp/host/lib/usrp_prims_common.cc +++ b/usrp/host/lib/usrp_prims_common.cc @@ -30,7 +30,7 @@ #include #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 7ff83106..23d278fe 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 #include diff --git a/usrp/host/lib/usrp_prims_libusb1.cc b/usrp/host/lib/usrp_prims_libusb1.cc index b7eba87e..0b514e97 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 #include diff --git a/usrp/host/lib/usrp_primsi.h b/usrp/host/lib/usrp_primsi.h new file mode 100644 index 00000000..83cc31ae --- /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_ */ + -- 2.47.2