Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
usbhost
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
{
13
class
usb_endpoint_usbhost
:
public
usb_endpoint
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
?
27
RS2_USB_ENDPOINT_DIRECTION_READ
:
RS2_USB_ENDPOINT_DIRECTION_WRITE
;
28
}
29
30
usb_endpoint_descriptor
get_descriptor
(){
return
_desc
; }
31
private
:
32
usb_endpoint_descriptor
_desc
;
33
uint8_t
_interface_number
;
34
};
35
}
36
}
librealsense::platform::usb_endpoint_usbhost::get_interface_number
virtual uint8_t get_interface_number() const override
Definition:
endpoint-usbhost.h:22
librealsense::platform::usb_endpoint_usbhost::get_descriptor
usb_endpoint_descriptor get_descriptor()
Definition:
endpoint-usbhost.h:30
uint8_t
unsigned char uint8_t
Definition:
stdint.h:78
librealsense::platform::endpoint_direction
enum librealsense::platform::_endpoint_direction endpoint_direction
librealsense::platform::usb_endpoint_usbhost::get_type
virtual endpoint_type get_type() const override
Definition:
endpoint-usbhost.h:21
librealsense
Definition:
calibration-model.h:6
librealsense::platform::RS2_USB_ENDPOINT_DIRECTION_READ
Definition:
usb-types.h:68
librealsense::platform::usb_endpoint_usbhost::usb_endpoint_usbhost
usb_endpoint_usbhost(usb_endpoint_descriptor desc, uint8_t interface_number)
Definition:
endpoint-usbhost.h:16
librealsense::platform::usb_endpoint_usbhost::get_address
virtual uint8_t get_address() const override
Definition:
endpoint-usbhost.h:20
usb-endpoint.h
librealsense::platform::usb_endpoint_usbhost
Definition:
endpoint-usbhost.h:13
librealsense::platform::RS2_USB_ENDPOINT_DIRECTION_WRITE
Definition:
usb-types.h:67
librealsense::platform::usb_endpoint_usbhost::get_direction
virtual endpoint_direction get_direction() const override
Definition:
endpoint-usbhost.h:24
librealsense::platform::usb_endpoint_usbhost::_interface_number
uint8_t _interface_number
Definition:
endpoint-usbhost.h:33
librealsense::platform::endpoint_type
enum librealsense::platform::_endpoint_type endpoint_type
librealsense::platform::usb_endpoint
Definition:
usb-endpoint.h:15
librealsense::platform::usb_endpoint_usbhost::_desc
usb_endpoint_descriptor _desc
Definition:
endpoint-usbhost.h:32
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:47:14