Monado OpenXR Runtime
vive_common.h
Go to the documentation of this file.
1// Copyright 2020-2023, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Common things like defines for Vive and Index.
6 * @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
7 * @author Jakob Bornecrantz <jakob@collabora.com>
8 * @ingroup aux_vive
9 */
10
11#pragma once
12
13#include "xrt/xrt_compiler.h"
14
15#include "util/u_time.h"
16
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22
23/*!
24 * @defgroup aux_vive Shared code for @ref drv_vive and @ref drv_survive.
25 * @ingroup aux
26 *
27 * @brief Shared functionality for @ref drv_vive and @ref drv_survive drivers
28 * that supports the HTC Vive and Valve Index family of HMDs.
29 */
30
31/*!
32 * @dir auxiliary/vive
33 *
34 * @brief @ref aux_vive files.
35 */
36
37
38/*!
39 * Headset variant.
40 *
41 * @ingroup aux_vive
42 */
44{
45 VIVE_UNKNOWN = 0,
46 VIVE_VARIANT_VIVE,
47 VIVE_VARIANT_PRO,
48 VIVE_VARIANT_INDEX,
49 VIVE_VARIANT_PRO2,
50 VIVE_VARIANT_BEYOND,
51};
52
53#define HTC_VID 0x0bb4
54#define VALVE_VID 0x28de
55
56#define VIVE_PID 0x2c87
57#define VIVE_LIGHTHOUSE_FPGA_RX 0x2000
58
59#define VIVE_PRO_MAINBOARD_PID 0x0309
60#define VIVE_PRO2_MAINBOARD_PID 0x0342
61#define VIVE_PRO_LHR_PID 0x2300
62
63#define VIVE_WATCHMAN_DONGLE 0x2101
64#define VIVE_WATCHMAN_DONGLE_GEN2 0x2102
65
66enum VIVE_VARIANT
67vive_determine_variant(const char *model_number);
68
69bool
70vive_variant_scanout_info(enum VIVE_VARIANT variant,
71 time_duration_ns frame_period_ns,
72 time_duration_ns *out_scanout_time_ns,
73 enum xrt_scanout_direction *out_scanout_direction);
74
75#ifdef __cplusplus
76}
77#endif
int64_t time_duration_ns
Integer duration type in nanoseconds.
Definition: u_time.h:88
VIVE_VARIANT
Headset variant.
Definition: vive_common.h:44
Time-keeping: a clock that is steady, convertible to system time, and ideally high-resolution.
Header holding common defines.
xrt_scanout_direction
Screen scanout direction.
Definition: xrt_defines.h:179