2019-10-02 11:00:52 +00:00
|
|
|
// Copyright 2019, Collabora, Ltd.
|
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
|
|
/*!
|
|
|
|
* @file
|
|
|
|
* @brief Interface to @ref drv_vive.
|
|
|
|
* @author Jakob Bornecrantz <jakob@collabora.com>
|
|
|
|
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
|
|
|
|
* @ingroup drv_vive
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "xrt/xrt_prober.h"
|
|
|
|
|
2022-07-20 16:12:10 +00:00
|
|
|
#include "vive_device.h"
|
|
|
|
|
2019-10-02 11:00:52 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2020-03-02 18:33:10 +00:00
|
|
|
* @defgroup drv_vive HTC Vive and Valve Index driver
|
2019-10-02 11:00:52 +00:00
|
|
|
* @ingroup drv
|
|
|
|
*
|
|
|
|
* @brief Driver for the HTC Vive and Valve Index family of HMDs.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define HTC_VID 0x0bb4
|
|
|
|
#define VALVE_VID 0x28de
|
|
|
|
|
|
|
|
#define VIVE_PID 0x2c87
|
|
|
|
#define VIVE_LIGHTHOUSE_FPGA_RX 0x2000
|
|
|
|
|
|
|
|
#define VIVE_PRO_MAINBOARD_PID 0x0309
|
|
|
|
#define VIVE_PRO_LHR_PID 0x2300
|
|
|
|
|
2020-07-02 15:14:34 +00:00
|
|
|
#define VIVE_WATCHMAN_DONGLE 0x2101
|
|
|
|
#define VIVE_WATCHMAN_DONGLE_GEN2 0x2102
|
|
|
|
|
2019-10-02 11:00:52 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* Probing function for Vive devices.
|
|
|
|
*
|
|
|
|
* @ingroup drv_vive
|
2022-05-11 12:07:28 +00:00
|
|
|
* @see xrt_prober_found_func_t
|
2019-10-02 11:00:52 +00:00
|
|
|
*/
|
|
|
|
int
|
|
|
|
vive_found(struct xrt_prober *xp,
|
|
|
|
struct xrt_prober_device **devices,
|
2021-11-08 22:54:21 +00:00
|
|
|
size_t device_count,
|
2019-10-02 11:00:52 +00:00
|
|
|
size_t index,
|
2019-11-08 11:26:25 +00:00
|
|
|
cJSON *attached_data,
|
2022-07-20 16:12:10 +00:00
|
|
|
struct vive_tracking_status tstatus,
|
2022-07-25 15:05:53 +00:00
|
|
|
struct vive_source *vs,
|
2022-05-25 21:01:02 +00:00
|
|
|
struct vive_config **out_vive_config,
|
2019-10-02 11:00:52 +00:00
|
|
|
struct xrt_device **out_xdev);
|
|
|
|
|
2020-07-02 15:14:34 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* Probing function for HTC Vive and Valve Index controllers.
|
|
|
|
*
|
|
|
|
* @ingroup drv_vive
|
2022-05-11 12:07:28 +00:00
|
|
|
* @see xrt_prober_found_func_t
|
2020-07-02 15:14:34 +00:00
|
|
|
*/
|
|
|
|
int
|
|
|
|
vive_controller_found(struct xrt_prober *xp,
|
|
|
|
struct xrt_prober_device **devices,
|
2021-11-08 22:54:21 +00:00
|
|
|
size_t device_count,
|
2020-07-02 15:14:34 +00:00
|
|
|
size_t index,
|
|
|
|
cJSON *attached_data,
|
|
|
|
struct xrt_device **out_xdevs);
|
|
|
|
|
2019-10-02 11:00:52 +00:00
|
|
|
/*!
|
|
|
|
* @dir drivers/vive
|
|
|
|
*
|
|
|
|
* @brief @ref drv_vive files.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|