Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
usbhost
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
{
16
class
handle_usbhost
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
{
25
claim_interface
(
i
);
26
}
27
}
28
29
~handle_usbhost
()
30
{
31
32
// for(auto&& i : _interfaces)
33
// {
34
// usb_device_release_interface(_device, i->get_number());
35
// }
36
}
37
38
private
:
39
void
claim_interface
(
rs_usb_interface
interface)
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
46
::usb_device
*
_device
;
47
// std::vector<rs_usb_interface> _interfaces;
48
};
49
}
50
}
librealsense::platform::handle_usbhost
Definition:
handle-usbhost.h:16
librealsense::platform::rs_usb_interface
std::shared_ptr< usb_interface > rs_usb_interface
Definition:
usb-interface.h:31
librealsense::platform::handle_usbhost::handle_usbhost
handle_usbhost(::usb_device *device, std::shared_ptr< usb_interface_usbhost > interface)
Definition:
handle-usbhost.h:19
librealsense
Definition:
calibration-model.h:6
usb_device_connect_kernel_driver
int usb_device_connect_kernel_driver(struct usb_device *device, unsigned int interface, int connect)
Definition:
usbhost.c:614
librealsense::platform::handle_usbhost::claim_interface
void claim_interface(rs_usb_interface interface)
Definition:
handle-usbhost.h:39
usbhost.h
librealsense::platform::handle_usbhost::~handle_usbhost
~handle_usbhost()
Definition:
handle-usbhost.h:29
librealsense::platform::usb_device
Definition:
usb-device.h:17
i
int i
Definition:
rs-pcl-color.cpp:54
librealsense::platform::handle_usbhost::_device
::usb_device * _device
Definition:
handle-usbhost.h:46
interface-usbhost.h
usb_device_claim_interface
int usb_device_claim_interface(struct usb_device *device, unsigned int interface)
Definition:
usbhost.c:604
librealsense::device
Definition:
device.h:43
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:47:16