endpoint-usbhost.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 <linux/usb/ch9.h>
7 #include "usb/usb-endpoint.h"
8 
9 namespace librealsense
10 {
11  namespace platform
12  {
14  {
15  public:
16  usb_endpoint_usbhost(usb_endpoint_descriptor desc, uint8_t interface_number) :
17  _desc(desc), _interface_number(interface_number)
18  { }
19 
20  virtual uint8_t get_address() const override { return _desc.bEndpointAddress; }
21  virtual endpoint_type get_type() const override { return (endpoint_type)_desc.bmAttributes; }
22  virtual uint8_t get_interface_number() const override { return _interface_number; }
23 
24  virtual endpoint_direction get_direction() const override
25  {
26  return _desc.bEndpointAddress >= RS2_USB_ENDPOINT_DIRECTION_READ ?
28  }
29 
30  usb_endpoint_descriptor get_descriptor(){ return _desc; }
31  private:
32  usb_endpoint_descriptor _desc;
34  };
35  }
36 }
virtual uint8_t get_interface_number() const override
unsigned char uint8_t
Definition: stdint.h:78
enum librealsense::platform::_endpoint_direction endpoint_direction
virtual endpoint_type get_type() const override
usb_endpoint_usbhost(usb_endpoint_descriptor desc, uint8_t interface_number)
virtual uint8_t get_address() 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