USRP Hardware Driver and USRP Manual: uhd::transport::usb_control Class Reference

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::transport::usb_control Class Referenceabstract

`#include <uhd/transport/usb_control.hpp>`

Inheritance diagram for uhd::transport::usb_control:

## Public Types
typedef std::shared_ptr< usb_control > | sptr

## Public Member Functions
virtual | ~usb_control (void)
virtual int | submit (uint8_t request_type, uint8_t request, uint16_t value, uint16_t index, unsigned char *buff, uint16_t length, uint32_t timeout=0)=0

## Static Public Member Functions
static sptr | make (usb_device_handle::sptr handle, const int interface)

## Member Typedef Documentation

## ◆ sptr

typedef std::shared_ptr<usb_control> uhd::transport::usb_control::sptr

## Constructor & Destructor Documentation

## ◆ ~usb_control()

virtual uhd::transport::usb_control::~usb_control | ( | void |  | ) |
| virtual

## Member Function Documentation

## ◆ make()

sptr uhd::transport::usb_control::make | ( | usb_device_handle::sptr | handle,
|  | const int | 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.

Parameters

  handle | a device handle that uniquely identifies a USB device
  interface | the USB interface number for the control transport

## ◆ submit()

virtual int uhd::transport::usb_control::submit | ( | uint8_t | request_type,
|  | uint8_t | request,
|  | uint16_t | value,
|  | uint16_t | index,
|  | unsigned char * | buff,
|  | uint16_t | length,
|  | uint32_t | timeout = 0 )
| 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

Parameters

  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)
  timeout | 4-byte (timeout, default is infinite wait)

Returns
  number of bytes submitted or error code

The documentation for this class was generated from the following file:

- usb_control.hpp