endpoint-libusb.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "usb/usb-endpoint.h"
7 
8 #include <libusb.h>
9 
10 namespace librealsense
11 {
12  namespace platform
13  {
15  {
16  public:
17  usb_endpoint_libusb(libusb_endpoint_descriptor desc, uint8_t interface_number) :
18  _desc(desc), _interface_number(interface_number)
19  { }
20 
21  virtual uint8_t get_address() const override { return _desc.bEndpointAddress; }
22  virtual endpoint_type get_type() const override { return (endpoint_type)_desc.bmAttributes; }
23  virtual uint8_t get_interface_number() const override { return _interface_number; }
24 
25  virtual endpoint_direction get_direction() const override
26  {
27  return _desc.bEndpointAddress >= RS2_USB_ENDPOINT_DIRECTION_READ ?
29  }
30 
31  libusb_endpoint_descriptor get_descriptor(){ return _desc; }
32  private:
33  libusb_endpoint_descriptor _desc;
35  };
36  }
37 }
virtual uint8_t get_address() const override
usb_endpoint_libusb(libusb_endpoint_descriptor desc, uint8_t interface_number)
unsigned char uint8_t
Definition: stdint.h:78
enum librealsense::platform::_endpoint_direction endpoint_direction
libusb_endpoint_descriptor get_descriptor()
virtual uint8_t get_interface_number() const override
virtual endpoint_type get_type() const override
virtual endpoint_direction get_direction() const override
enum librealsense::platform::_endpoint_type endpoint_type


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:14