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