aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/cmake/msvc/erllc_uhd_b205mini.inf175
-rw-r--r--host/lib/usrp/b200/b200_iface.hpp45
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp30
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp3
-rw-r--r--host/lib/usrp/b200/b200_io_impl.cpp3
-rw-r--r--host/utils/b2xx_fx3_utils.cpp5
6 files changed, 224 insertions, 37 deletions
diff --git a/host/cmake/msvc/erllc_uhd_b205mini.inf b/host/cmake/msvc/erllc_uhd_b205mini.inf
new file mode 100644
index 000000000..1e5852656
--- /dev/null
+++ b/host/cmake/msvc/erllc_uhd_b205mini.inf
@@ -0,0 +1,175 @@
+; ======== libusb 1.0 (WinUSB) device driver ==========
+;
+; To customize this inf file for your own device
+;
+; 1. Change "DeviceName" with the name you want your device to appear with
+; on your system.
+;
+; 2. Change "VendorID" and "ProductID" according to those of your device.
+; If your device is plugged in, you can retrieve these values through the
+; Device Manager (regardless of whether the driver is installed or not).
+;
+; 3. Change "DeviceGUID" to a value that is unique on your system. For more
+; information and tools to help you generate your own GUIDs, see
+; http://en.wikipedia.org/wiki/Universally_Unique_Identifier.
+;
+; 4. Change "DeviceClassGUID" to reflect your USB Device Class.
+; The following Device Classes are listed for reference:
+; {745a17a0-74d3-11d0-b6fe-00a0c90f57da} : HID device
+; {78a1c341-4539-11d3-b88d-00c04fad5171} : Generic WinUSB device
+;
+; 5. (Optional) Change the "Date" string.
+;
+; Note 1: if you need to create a matching cat file for this inf, you can use
+; the inf2cat utility from the WinDDK, with the the following command:
+; inf2cat /driver:"path_to_your inf" /os:7_X86,7_X64,Vista_X86,Vista_X64
+;
+; Note 2: The co-installers provided in these files are version 1.9.
+; Please refer to:
+; http://blogs.msdn.com/iliast/archive/2008/03/10/why-do-we-need-wdf-coinstallers.aspx and
+; http://blogs.msdn.com/iliast/archive/2009/08/13/wdf-logo-requirements-regarding-coinstallers.aspx
+; for more information about co-installers and their versioning
+
+; ===================== Strings =======================
+
+[Strings]
+
+; =====================================================
+; ========= START USER CONFIGURABLE SECTION ===========
+; =====================================================
+
+DeviceName = "Ettus Research B205mini"
+; Make sure "VID_" and "PID_" are always part of the strings below
+VendorID = "VID_2500"
+ProductID = "PID_0022"
+DeviceGUID = "{211d89c8-92d7-11e5-be76-3c970eb8a18b}"
+DeviceClassGUID = "{78a1c341-4539-11d3-b88d-00c04fad5171}"
+; Date MUST be in MM/DD/YYYY format
+Date = "11/24/2015"
+
+; =====================================================
+; ========== END USER CONFIGURABLE SECTION ============
+; =====================================================
+
+ProviderName = "libusb 1.0"
+WinUSB_SvcDesc = "WinUSB Driver Service"
+DiskName = "libusb (WinUSB) Device Install Disk"
+ClassName = "libusb (WinUSB) devices"
+
+; ====================== Version ======================
+
+[Version]
+DriverVer = %Date%
+Signature = "$Windows NT$"
+Class = %ClassName%
+ClassGuid = %DeviceClassGUID%
+Provider = %ProviderName%
+CatalogFile = libusb_device.cat
+
+; =================== Class section ===================
+
+; Since the device is not a standard USB device, we define a new class for it.
+[ClassInstall32]
+Addreg = WinUSBDeviceClassReg
+
+[WinUSBDeviceClassReg]
+HKR,,,0,%ClassName%
+; -20 is for the USB icon
+HKR,,Icon,,-20
+
+; =========== Manufacturer/Models sections ============
+
+[Manufacturer]
+%ProviderName% = libusbDevice_WinUSB,NTx86,NTamd64
+
+[libusbDevice_WinUSB.NTx86]
+%DeviceName% = USB_Install, USB\%VendorID%&%ProductID%
+
+[libusbDevice_WinUSB.NTamd64]
+%DeviceName% = USB_Install, USB\%VendorID%&%ProductID%
+
+; ==================== Installation ===================
+
+; The Include and Needs directives in the USB_Install section are required for
+; installing WinUSB on Windows Vista systems. Windows XP systems ignore these
+; directives. These directives should not be modified.
+[USB_Install]
+Include=winusb.inf
+Needs=WINUSB.NT
+
+; The Include directive in the USB_Install.Services section includes the system-
+; supplied INF for WinUSB. This INF is installed by the WinUSB co-installer if
+; it is not already on the target system. The AddService directive specifies
+; WinUsb.sys as the device’s function driver. These directives should not be
+; modified.
+[USB_Install.Services]
+Include=winusb.inf
+AddService=WinUSB,0x00000002,WinUSB_ServiceInstall
+
+; The WinUSB_ServiceInstall section contains the data for installing WinUsb.sys
+; as a service. This section should not be modified.
+[WinUSB_ServiceInstall]
+DisplayName = %WinUSB_SvcDesc%
+ServiceType = 1
+StartType = 3
+ErrorControl = 1
+ServiceBinary = %12%\WinUSB.sys
+
+; The KmdfService directive installs WinUsb.sys as a kernel-mode service. The
+; referenced WinUSB_Install section specifies the KMDF library version.
+; Usually, the version can be derived from the WdfCoInstallerxxyyy.dll with
+; xx = major, yyy = minor
+[USB_Install.Wdf]
+KmdfService=WINUSB, WinUsb_Install
+
+[WinUSB_Install]
+KmdfLibraryVersion=1.9
+
+; USB_Install.HW is the key section in the INF. It specifies the device
+; interface globally unique identifier (GUID) for your device. The AddReg
+; directive puts the interface GUID in a standard registry value. When
+; WinUsb.sys is loaded as the device’s function driver, it reads the registry
+; value and uses the specified GUID to represent the device interface. You
+; should replace the GUID in this example with one that you create specifically
+; for your device. If the protocols for the device change, you should create a
+; new device interface GUID.
+[USB_Install.HW]
+AddReg=Dev_AddReg
+
+[Dev_AddReg]
+HKR,,DeviceInterfaceGUIDs,0x10000,%DeviceGUID%
+
+; The USB_Install.CoInstallers section, including the referenced AddReg and
+; CopyFiles sections, contains data and instructions to install the WinUSB and
+; KMDF co installers and associate them with the device. Most USB devices can
+; use these sections and directives without modification.
+[USB_Install.CoInstallers]
+AddReg=CoInstallers_AddReg
+CopyFiles=CoInstallers_CopyFiles
+
+[CoInstallers_AddReg]
+HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
+
+[CoInstallers_CopyFiles]
+WinUSBCoInstaller2.dll
+WdfCoInstaller01009.dll
+
+[DestinationDirs]
+CoInstallers_CopyFiles=11
+
+; =============== Source Media Section ================
+
+; The x86 and x64 versions of Windows have separate co installers. This example
+; stores them on the installation disk in folders that are named x86 and amd64
+[SourceDisksNames]
+1 = %DiskName%,,,\x86
+2 = %DiskName%,,,\amd64
+
+[SourceDisksFiles.x86]
+WinUSBCoInstaller2.dll=1
+WdfCoInstaller01009.dll=1
+
+[SourceDisksFiles.amd64]
+WinUSBCoInstaller2.dll=2
+WdfCoInstaller01009.dll=2
+
diff --git a/host/lib/usrp/b200/b200_iface.hpp b/host/lib/usrp/b200/b200_iface.hpp
index 19ec561fa..e45c78d49 100644
--- a/host/lib/usrp/b200/b200_iface.hpp
+++ b/host/lib/usrp/b200/b200_iface.hpp
@@ -30,25 +30,28 @@
enum b200_product_t {
B200,
B210,
- B205
+ B200MINI,
+ B205MINI
};
// These are actual USB PIDs (not Ettus Product IDs)
-const static boost::uint16_t B200_VENDOR_ID = 0x2500;
-const static boost::uint16_t B200_VENDOR_NI_ID = 0x3923;
-const static boost::uint16_t B200_PRODUCT_ID = 0x0020;
-const static boost::uint16_t B205_PRODUCT_ID = 0x0021;
-const static boost::uint16_t B200_PRODUCT_NI_ID = 0x7813;
-const static boost::uint16_t B210_PRODUCT_NI_ID = 0x7814;
-const static boost::uint16_t FX3_VID = 0x04b4;
-const static boost::uint16_t FX3_DEFAULT_PID = 0x00f3;
-const static boost::uint16_t FX3_REENUM_PID = 0x00f0;
+const static boost::uint16_t B200_VENDOR_ID = 0x2500;
+const static boost::uint16_t B200_VENDOR_NI_ID = 0x3923;
+const static boost::uint16_t B200_PRODUCT_ID = 0x0020;
+const static boost::uint16_t B200MINI_PRODUCT_ID = 0x0021;
+const static boost::uint16_t B205MINI_PRODUCT_ID = 0x0022;
+const static boost::uint16_t B200_PRODUCT_NI_ID = 0x7813;
+const static boost::uint16_t B210_PRODUCT_NI_ID = 0x7814;
+const static boost::uint16_t FX3_VID = 0x04b4;
+const static boost::uint16_t FX3_DEFAULT_PID = 0x00f3;
+const static boost::uint16_t FX3_REENUM_PID = 0x00f0;
//! Map the USB PID to the product (only for PIDs that map to a single product)
static const uhd::dict<boost::uint16_t, b200_product_t> B2XX_PID_TO_PRODUCT = boost::assign::map_list_of
- (B200_PRODUCT_NI_ID, B200)
- (B210_PRODUCT_NI_ID, B210)
- (B205_PRODUCT_ID, B205)
+ (B200_PRODUCT_NI_ID, B200)
+ (B210_PRODUCT_NI_ID, B210)
+ (B200MINI_PRODUCT_ID, B200MINI)
+ (B205MINI_PRODUCT_ID, B205MINI)
;
static const std::string B200_FW_FILE_NAME = "usrp_b200_fw.hex";
@@ -61,21 +64,25 @@ static const uhd::dict<boost::uint16_t, b200_product_t> B2XX_PRODUCT_ID = boost:
(0x0002, B210)
(0x7738, B210)
(B210_PRODUCT_NI_ID, B210)
- (0x0003, B205)
- (0x7739, B205)
+ (0x0003, B200MINI)
+ (0x7739, B200MINI)
+ (0x0004, B205MINI)
+ (0x773a, B205MINI)
;
static const uhd::dict<b200_product_t, std::string> B2XX_STR_NAMES = boost::assign::map_list_of
- (B200, "B200")
- (B210, "B210")
- (B205, "B200mini")
+ (B200, "B200")
+ (B210, "B210")
+ (B200MINI, "B200mini")
+ (B205MINI, "B205mini")
;
static const uhd::dict<b200_product_t, std::string> B2XX_FPGA_FILE_NAME = boost::assign::map_list_of
(B200, "usrp_b200_fpga.bin")
(B210, "usrp_b210_fpga.bin")
- (B205, "usrp_b200mini_fpga.bin")
+ (B200MINI, "usrp_b200mini_fpga.bin")
+ (B205MINI, "usrp_b205mini_fpga.bin")
;
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 9a2c65680..38709bbb3 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -74,9 +74,9 @@ public:
};
// B205
-class b205_ad9361_client_t : public ad9361_params {
+class b2xxmini_ad9361_client_t : public ad9361_params {
public:
- ~b205_ad9361_client_t() {}
+ ~b2xxmini_ad9361_client_t() {}
double get_band_edge(frequency_band_t band) {
switch (band) {
case AD9361_RX_BAND0: return 0; // Set these all to
@@ -318,7 +318,8 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
else if (specified_vid)
{
vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(vid, B200_PRODUCT_ID));
- vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(vid, B205_PRODUCT_ID));
+ vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(vid, B200MINI_PRODUCT_ID));
+ vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(vid, B205MINI_PRODUCT_ID));
vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(vid, B200_PRODUCT_NI_ID));
vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(vid, B210_PRODUCT_NI_ID));
}
@@ -332,7 +333,8 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
else
{
vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B200_PRODUCT_ID));
- vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B205_PRODUCT_ID));
+ vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B200MINI_PRODUCT_ID));
+ vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B205MINI_PRODUCT_ID));
vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(B200_VENDOR_NI_ID, B200_PRODUCT_NI_ID));
vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(B200_VENDOR_NI_ID, B210_PRODUCT_NI_ID));
}
@@ -386,7 +388,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
UHD_MSG(status) << "Detected Device: " << B2XX_STR_NAMES[_product] << std::endl;
- _gpsdo_capable = (_product != B205);
+ _gpsdo_capable = (not (_product == B200MINI or _product == B205MINI));
////////////////////////////////////////////////////////////////////
// Set up frontend mapping
@@ -405,7 +407,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
_fe2 = 0;
_gpio_state.swap_atr = 1;
// Unswapped setup:
- if (_product == B205 or (_product == B200 and _revision >= 5)) {
+ if (_product == B200MINI or _product == B205MINI or (_product == B200 and _revision >= 5)) {
_fe1 = 0; //map radio0 to FE1
_fe2 = 1; //map radio1 to FE2
_gpio_state.swap_atr = 0; // ATRs for radio0 are mapped to FE1
@@ -512,7 +514,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
////////////////////////////////////////////////////////////////////
_tree->create<std::string>("/name").set("B-Series Device");
_tree->create<std::string>(mb_path / "name").set(product_name);
- _tree->create<std::string>(mb_path / "codename").set((_product == B205) ? "Pixie" : "Sasquatch");
+ _tree->create<std::string>(mb_path / "codename").set((_product == B200MINI or _product == B205MINI) ? "Pixie" : "Sasquatch");
////////////////////////////////////////////////////////////////////
// Create data transport
@@ -540,7 +542,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
// create time and clock control objects
////////////////////////////////////////////////////////////////////
_spi_iface = b200_local_spi_core::make(_local_ctrl);
- if (_product != B205) {
+ if (not (_product == B200MINI or _product == B205MINI)) {
_adf4001_iface = boost::make_shared<b200_ref_pll_ctrl>(_spi_iface);
}
@@ -549,8 +551,8 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
////////////////////////////////////////////////////////////////////
UHD_MSG(status) << "Initialize CODEC control..." << std::endl;
ad9361_params::sptr client_settings;
- if (_product == B205) {
- client_settings = boost::make_shared<b205_ad9361_client_t>();
+ if (_product == B200MINI or _product == B205MINI) {
+ client_settings = boost::make_shared<b2xxmini_ad9361_client_t>();
} else {
client_settings = boost::make_shared<b200_ad9361_client_t>();
}
@@ -949,7 +951,7 @@ void b200_impl::check_fpga_compat(void)
if (signature != 0xACE0BA5E) throw uhd::runtime_error(
"b200::check_fpga_compat signature register readback failed");
- const boost::uint16_t expected = (_product == B205 ? B205_FPGA_COMPAT_NUM : B200_FPGA_COMPAT_NUM);
+ const boost::uint16_t expected = ((_product == B200MINI or _product == B205MINI) ? B205_FPGA_COMPAT_NUM : B200_FPGA_COMPAT_NUM);
if (compat_major != expected)
{
throw uhd::runtime_error(str(boost::format(
@@ -995,7 +997,7 @@ void b200_impl::set_fp_gpio(gpio_core_200::sptr gpio, const gpio_attr_t attr, co
void b200_impl::update_clock_source(const std::string &source)
{
// For B205, ref_sel selects whether or not to lock to the external clock source
- if (_product == B205)
+ if (_product == B200MINI or _product == B205MINI)
{
if (source == "external" and _time_source == EXTERNAL)
{
@@ -1057,7 +1059,7 @@ void b200_impl::update_clock_source(const std::string &source)
void b200_impl::update_time_source(const std::string &source)
{
- if (_product == B205 and source == "external" and _gpio_state.ref_sel == 1)
+ if ((_product == B200MINI or _product == B205MINI) and source == "external" and _gpio_state.ref_sel == 1)
{
throw uhd::value_error("external reference cannot be both a time source and a clock source");
}
@@ -1102,7 +1104,7 @@ void b200_impl::sync_times()
void b200_impl::update_bandsel(const std::string& which, double freq)
{
// B205 does not have bandsels
- if (_product == B205) {
+ if (_product == B200MINI or _product == B205MINI) {
return;
}
diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp
index 041c8bcb2..22dd231ce 100644
--- a/host/lib/usrp/b200/b200_impl.hpp
+++ b/host/lib/usrp/b200/b200_impl.hpp
@@ -95,7 +95,8 @@ static const unsigned char B200_USB_DATA_SEND_ENDPOINT = 2;
static std::vector<uhd::transport::usb_device_handle::vid_pid_pair_t> b200_vid_pid_pairs =
boost::assign::list_of
(uhd::transport::usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B200_PRODUCT_ID))
- (uhd::transport::usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B205_PRODUCT_ID))
+ (uhd::transport::usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B200MINI_PRODUCT_ID))
+ (uhd::transport::usb_device_handle::vid_pid_pair_t(B200_VENDOR_ID, B205MINI_PRODUCT_ID))
(uhd::transport::usb_device_handle::vid_pid_pair_t(B200_VENDOR_NI_ID, B200_PRODUCT_NI_ID))
(uhd::transport::usb_device_handle::vid_pid_pair_t(B200_VENDOR_NI_ID, B210_PRODUCT_NI_ID))
;
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index 7fcd04823..5b0c4ba13 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -228,7 +228,8 @@ uhd::usrp::subdev_spec_t b200_impl::coerce_subdev_spec(const uhd::usrp::subdev_s
//
// Any other spec is probably illegal and will be caught by
// validate_subdev_spec().
- if (spec.size() and (_product == B200 or _product == B205) and spec[0].sd_name == "B") {
+ if (spec.size() and (_product == B200 or _product == B200MINI or _product == B205MINI) and spec[0].sd_name == "B")
+ {
spec[0].sd_name = "A";
}
return spec;
diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp
index a3eaf862a..a6896c868 100644
--- a/host/utils/b2xx_fx3_utils.cpp
+++ b/host/utils/b2xx_fx3_utils.cpp
@@ -52,7 +52,8 @@ const static vid_pid_t known_vid_pids[] = {
{FX3_VID, FX3_DEFAULT_PID},
{FX3_VID, FX3_REENUM_PID},
{B200_VENDOR_ID, B200_PRODUCT_ID},
- {B200_VENDOR_ID, B205_PRODUCT_ID},
+ {B200_VENDOR_ID, B200MINI_PRODUCT_ID},
+ {B200_VENDOR_ID, B205MINI_PRODUCT_ID},
{B200_VENDOR_NI_ID, B200_PRODUCT_NI_ID},
{B200_VENDOR_NI_ID, B210_PRODUCT_NI_ID}
};
@@ -175,7 +176,7 @@ uhd::transport::usb_device_handle::sptr open_device(const boost::uint16_t vid, c
vp = known_vid_pid_vector[i];
handles = uhd::transport::usb_device_handle::get_device_list(vp.vid, vp.pid);
}
-
+
}
if (handles.size() > 0)