handle-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 "types.h"
7 #include "usbhost.h"
8 #include "interface-usbhost.h"
9 
10 #include <vector>
11 
12 namespace librealsense
13 {
14  namespace platform
15  {
17  {
18  public:
19  handle_usbhost(::usb_device* device, std::shared_ptr<usb_interface_usbhost> interface) :
20  _device(device)
21  {
22  claim_interface(interface);
23  for(auto&& i : interface->get_associated_interfaces())
24  {
26  }
27  }
28 
30  {
31 
32 // for(auto&& i : _interfaces)
33 // {
34 // usb_device_release_interface(_device, i->get_number());
35 // }
36  }
37 
38  private:
40  {
41  usb_device_connect_kernel_driver(_device, interface->get_number(), false);
42  usb_device_claim_interface(_device, interface->get_number());
43 // _interfaces.push_back(interface);
44  }
45 
47 // std::vector<rs_usb_interface> _interfaces;
48  };
49  }
50 }
std::shared_ptr< usb_interface > rs_usb_interface
Definition: usb-interface.h:31
handle_usbhost(::usb_device *device, std::shared_ptr< usb_interface_usbhost > interface)
int usb_device_connect_kernel_driver(struct usb_device *device, unsigned int interface, int connect)
Definition: usbhost.c:614
void claim_interface(rs_usb_interface interface)
int i
int usb_device_claim_interface(struct usb_device *device, unsigned int interface)
Definition: usbhost.c:604


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