Main MRPT website > C++ reference for MRPT 1.9.9
Macros | Functions
enumerateusbdevices.cpp File Reference
#include "xcommunicationconfig.h"
#include "enumerateusbdevices.h"
#include <windows.h>
#include <string.h>
#include <setupapi.h>
#include <devguid.h>
#include <regstr.h>

Go to the source code of this file.

Macros

#define XSENS_VENDOR_ID   0x2639
 
#define ATMEL_VENDOR_ID   0x03eb
 
#define ATMEL_BORROWED_PRODUCT_ID   0x2307
 

Functions

bool xsEnumerateUsbDevices (XsPortInfoList &ports)
 Enumerate Xsens USB devices. More...
 

Macro Definition Documentation

◆ ATMEL_BORROWED_PRODUCT_ID

#define ATMEL_BORROWED_PRODUCT_ID   0x2307

Definition at line 27 of file enumerateusbdevices.cpp.

Referenced by xsEnumerateUsbDevices().

◆ ATMEL_VENDOR_ID

#define ATMEL_VENDOR_ID   0x03eb

Definition at line 26 of file enumerateusbdevices.cpp.

Referenced by xsEnumerateUsbDevices().

◆ XSENS_VENDOR_ID

#define XSENS_VENDOR_ID   0x2639

Definition at line 25 of file enumerateusbdevices.cpp.

Referenced by xsEnumerateUsbDevices().

Function Documentation

◆ xsEnumerateUsbDevices()

bool xsEnumerateUsbDevices ( XsPortInfoList ports)

Enumerate Xsens USB devices.

If the OS already has drivers running for a device, the device should already have been found by xsEnumerateSerialPorts().

Parameters
[in,out]portsThe list of serial ports to append to

Definition at line 37 of file enumerateusbdevices.cpp.

References ATMEL_BORROWED_PRODUCT_ID, ATMEL_VENDOR_ID, XsLibUsb::close, XsLibUsb::exit, FALSE, XsLibUsb::free_config_descriptor, XsLibUsb::free_device_list, XsLibUsb::get_active_config_descriptor, XsLibUsb::get_bus_number, XsLibUsb::get_device_address, XsLibUsb::get_device_descriptor, XsLibUsb::get_device_list, XsLibUsb::get_string_descriptor_ascii, XsLibUsb::init, JLDEBUG, XsLibUsb::kernel_driver_active, XsLibUsb::open, mrpt::system::os::sprintf(), XsLibUsb::unref_device, and XSENS_VENDOR_ID.

Referenced by mrpt::hwdrivers::CIMUXSens_MT4::initialize().

Here is the call graph for this function:
Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019