Monado OpenXR Runtime
Loading...
Searching...
No Matches
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 VIVE_VARIANT_PIMAX_P2,
52};
53
54#define HTC_VID 0x0bb4
55#define VALVE_VID 0x28de
56
57#define VIVE_PID 0x2c87
58#define VIVE_LIGHTHOUSE_FPGA_RX 0x2000
59
60#define VIVE_PRO_MAINBOARD_PID 0x0309
61#define VIVE_PRO2_MAINBOARD_PID 0x0342
62#define VIVE_PRO_LHR_PID 0x2300
63
64#define VIVE_WATCHMAN_DONGLE 0x2101
65#define VIVE_WATCHMAN_DONGLE_GEN2 0x2102
66
67enum VIVE_VARIANT
68vive_determine_variant(const char *model_number);
69
70bool
71vive_variant_scanout_info(enum VIVE_VARIANT variant,
73 time_duration_ns *out_scanout_time_ns,
74 enum xrt_scanout_direction *out_scanout_direction,
75 enum xrt_panel_refresh_type *out_panel_refresh_type);
76
77#ifdef __cplusplus
78}
79#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
static double frame_period_ns(struct t_led_sync_refinement *refinement)
The best frame period estimate, falling back to the per-frame interval until there is a long-run one.
Definition led_sync_internal.h:52
Time-keeping: a clock that is steady, convertible to system time, and ideally high-resolution.
Header holding common defines.
xrt_panel_refresh_type
The type of panel refresh the device has.
Definition xrt_defines.h:179
xrt_scanout_direction
Screen scanout direction.
Definition xrt_defines.h:190