aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/libusb1_control.cpp
diff options
context:
space:
mode:
authorThomas Tsou <ttsou@vt.edu>2010-08-27 23:46:16 -0700
committerThomas Tsou <ttsou@vt.edu>2010-08-28 00:18:46 -0700
commitad55e25aeb273fb7278c6d5175cd0df01fc90924 (patch)
tree0af72be0bfa69df5a8bae07b5e2c337bec707ef0 /host/lib/transport/libusb1_control.cpp
parent2c85b17215fbe5fd2f80a8c6d0c47504a631c09b (diff)
downloaduhd-ad55e25aeb273fb7278c6d5175cd0df01fc90924.tar.gz
uhd-ad55e25aeb273fb7278c6d5175cd0df01fc90924.tar.bz2
uhd-ad55e25aeb273fb7278c6d5175cd0df01fc90924.zip
usrp1: Additional comments on libusb transport implemenation
Diffstat (limited to 'host/lib/transport/libusb1_control.cpp')
-rw-r--r--host/lib/transport/libusb1_control.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/host/lib/transport/libusb1_control.cpp b/host/lib/transport/libusb1_control.cpp
index 4b827c350..3531128b2 100644
--- a/host/lib/transport/libusb1_control.cpp
+++ b/host/lib/transport/libusb1_control.cpp
@@ -48,8 +48,15 @@ libusb_control_impl::libusb_control_impl(usb_device_handle::sptr handle)
{
libusb::init(&_ctx, libusb_debug_level);
+ // Find and open the libusb_device corresponding to the
+ // given handle and return the libusb_device_handle
+ // that can be used for I/O purposes.
_dev_handle = libusb::open_device(_ctx, handle);
+ // Open USB interfaces for control using magic value
+ // IN interface: 2
+ // OUT interface: 1
+ // Control interface: 0
libusb::open_interface(_dev_handle, 0);
}