UHD
003.004.001-38-stable
|
#include <usb_control.hpp>
Public Types | |
typedef boost::shared_ptr < usb_control > | sptr |
Public Member Functions | |
virtual ssize_t | submit (boost::uint8_t request_type, boost::uint8_t request, boost::uint16_t value, boost::uint16_t index, unsigned char *buff, boost::uint16_t length)=0 |
Static Public Member Functions | |
static sptr | make (usb_device_handle::sptr handle, const size_t interface) |
typedef boost::shared_ptr<usb_control> uhd::transport::usb_control::sptr |
static sptr uhd::transport::usb_control::make | ( | usb_device_handle::sptr | handle, |
const size_t | interface | ||
) | [static] |
Create a new usb control transport: This transport is for sending and receiving control information from the host to device using the Default Control Pipe.
handle | a device handle that uniquely identifies a USB device |
interface | the USB interface number for the control transport |
virtual ssize_t uhd::transport::usb_control::submit | ( | boost::uint8_t | request_type, |
boost::uint8_t | request, | ||
boost::uint16_t | value, | ||
boost::uint16_t | index, | ||
unsigned char * | buff, | ||
boost::uint16_t | length | ||
) | [pure virtual] |
Submit a USB device request: Blocks until the request returns
For format and corresponding USB request fields see USB Specification Revision 2.0 - 9.3 USB Device Requests
Usage is device specific
request_type | 1-byte bitmask (bmRequestType) |
request | 1-byte (bRequest) |
value | 2-byte (wValue) |
index | 2-byte (wIndex) |
buff | buffer to hold send or receive data |
length | 2-byte (wLength) |