aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/libusb1_base.cpp
Commit message (Collapse)AuthorAgeFilesLines
* host: Update code base using clang-tidyMartin Braun2021-03-041-23/+24
| | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
* libusb: Remove deprecation warnings for libusb_set_debugMartin Braun2020-04-151-1/+14
| | | | | | | | | | | Starting with 1.0.22, libusb considers libusb_set_debug() deprecated. This replaces said call with libusb_set_option(), conditionally on the libusb version. This has no effect on the execution, but will remove some compiler versions, and make this code more future-proof. Note that Ubuntu 18.04 ships libusb 1.0.21, so this conditional code needs to remain until that version is deprecated and libusb version is bumped higher.
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-1/+1
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | Note: Replacing everything with a lambda would be even better, but that can't be easily scripted so we'll do this as a first step to reduce the Boost footprint. This also removes occurences of #include <boost/bind.hpp>, and makes sure all usages of std::bind have an #include <functional>. clang-format wasn't always applied to minimize the changeset in this commit, however, it was applied to the blocks of #includes. Due to conflicts with other Boost libraries, the placeholders _1, _2, etc. could not be directly used, but had to be explicitly called out (as std::placeholders::_1, etc.). This makes the use of std::bind even uglier, which serves as another reminder that using std::bind (and even more so, boost::bind) should be avoided. nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It was not possible to remove it by simply doing a search and replace, so it will be removed in a separate commit.
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-261-3/+3
| | | | | | | | | | | | | | | | | | | This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include <memory>. Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct.
* libusb: fix global session race conditionMark Meserve2019-10-161-0/+5
| | | | | - It was possible for two threads to generate a global session, which would cause one of them to become invalid.
* lib: transport: apply clang-formatBrent Stapleton2019-01-181-145/+202
| | | | | | | | | | This is a continuation of 967be2a4. $ find host/lib/transport -iname *.hpp -o -iname *.cpp |\ xargs clang-format -i -style=file Skipping host/lib/transport/nirio/ because of build errors. $ git checkout host/lib/transport/nirio
* uhd: Update license headersMartin Braun2018-02-191-1/+2
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* logging: Demoted a number of DEBUG messages to TRACEMartin Braun2017-04-051-3/+3
|
* utils: introduce new logging API and remove msg APIAndrej Rode2017-02-201-8/+8
|
* uhd: replace BOOST_FOREACH with C++11 range-based for loopAndrej Rode2017-02-101-2/+1
| | | | | Note: This is the first commit that uses for-range, and range-based for-loops are now usable for UHD development.
* Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width ↵Martin Braun2016-11-081-5/+5
| | | | | | | | types) - Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
* usb: tweak types for consistency between LIBUSB API calls and internal UHD ↵Michael Dickens2016-08-011-3/+3
| | | | usage of returned values.
* usb: add virtual destructors where needed; make virtual destructors ↵Michael Dickens2016-08-011-14/+42
| | | | out-of-line from class definition to reduce number of vtables emitted (according to clang).
* Fix for BUG 869: UHD: Unhandled exceptions during destruction of multi_usrp ↵michael-west2015-08-051-1/+12
| | | | | | | object cause application to terminate - Prevented libusb_zero_copy_single from submitting transfers after libusb reports an error - Made error messages in libusb_zero_copy and udp_zero_copy more descriptive
* b200: Change init sequence to catch bad USB statesBalint Seeber2015-08-031-0/+15
| | | | | - Fixes USB hang issues on OS X - Uses usb_errors
* Merge branch 'maint'Ashish Chaudhari2015-04-231-0/+1
|\ | | | | | | | | | | Conflicts: host/lib/usrp/b200/b200_impl.cpp host/lib/usrp/b200/b200_impl.hpp
| * B200: UHD now detects loaded FW on NI-USRP devicesBen Hilburn2015-04-151-0/+1
| | | | | | | | | | Conflicts: host/lib/transport/libusb1_base.cpp
* | Merge branch 'maint'Martin Braun2015-03-271-2/+3
|\|
| * usrp1: fixed check for loaded firmwareNicholas Corgan2015-03-271-2/+3
| |
* | Adding support for NI VID + PIDs for USRP B2xx devices.Ben Hilburn2014-12-181-7/+13
|/
* Added missing pure virtual destructors to base classesNicholas Corgan2014-09-011-1/+25
|
* usb: better processing of strings from libusbNicholas Corgan2014-02-141-1/+9
| | | | | * When overwriting a string field with a shorter string, libusb doesn't erase extra characters * Extra processing of this string (already done by load_eeprom) removes extraneous characters
* Merge branch 'bug182'Nicholas Corgan2013-11-191-0/+4
|\
| * BUG #182: Refactored b2xx_fx3_utils to use files from UHDMichael West2013-11-151-0/+4
| |
* | BUG #183: B200 High CPU Usage: Created a single thread to handle libusb ↵Michael West2013-11-081-0/+19
|/ | | | events and expanded packet size to 16k
* usb: added logging capability w/ env varJosh Blum2013-07-191-0/+10
|
* usb: added timeout param and additional queriesJosh Blum2013-07-151-5/+18
|
* usb: improve messages/logging for when the usb open failsJosh Blum2011-10-241-1/+15
|
* uhd: some tweaks to fix msvc warningsJosh Blum2011-07-081-1/+1
|
* uhd: replaced instanced of std::exception with the uhd exceptionsJosh Blum2011-02-241-4/+4
|
* uhd: renamed the assert header to assert hasJosh Blum2011-02-241-1/+1
| | | | | | | | only the assert has implementation is in this header uhd assert throw moved to the exception header updated code base includes to match
* usb: moved event handler thread into the zero copy interfaceJosh Blum2010-10-051-18/+0
|
* usb: catch open errors and print message, device: catch exceptions at ↵Josh Blum2010-10-011-5/+11
| | | | discovery time
* usb: set rt thread priority for the libusb event loopJosh Blum2010-09-301-0/+3
|
* usb: zero copy work, multiple endpoints with single context, async ioJosh Blum2010-09-261-0/+16
| | | | | | | | | Heavy work on the zero copy interface and endpoint wrappers to properly use the async io. The global libusb session starts a thread to run the event handler, the async callbacks push completed transfers onto a thread-safe bounded buffer. The managed buffer creation routines use the bounded buffer to efficiently pop off completed transfers. works on linux, throws a weird exception on cleanup
* usb: work on libusb code to use a single context across all callsJosh Blum2010-09-251-77/+212
| | | | | | | | libusb allocation stuff had been moved inside of smart pointer classes to handle automatic cleanup the public device handle implementation now holds an actual libusb device inside of it needs testing - all platforms
* usb: tweaks to usb code to cleanup properly and/or in error conditionsJosh Blum2010-09-241-10/+7
|
* usrp1: fixes to remove warnings and errors for usrp1 + libusb windowsJosh Blum2010-09-231-1/+1
|
* EEPROM burning in UHD. Changed some USB device handle stuff. Added ↵Nick Foster2010-08-311-44/+8
| | | | usrp_init_eeprom.cpp. Hacked up the firmware makefile to behave and to generate .bin EEPROM images instead of IHX.
* usrp1: Additional comments on libusb transport implemenationThomas Tsou2010-08-281-0/+12
|
* usrp1: Cleanup libusb device handlingThomas Tsou2010-08-271-9/+41
| | | | | | | | This patch limits all libusb device enumeration operations to FSF (Vendor ID = 0xfffe) devices, which removes a lot of unncessary libusb output when debug mode is enabled. The reference counts held by the libusb device list are also reduced, which prevents holding references to unused devices.
* usrp1: Modifiy USB transport implementations to use new interfaceThomas Tsou2010-08-261-0/+118
Common libusb1 code is consolidated in the libusb base file.