Monado OpenXR Runtime
Loading...
Searching...
No Matches
contactglove_interface.h
Go to the documentation of this file.
1// Copyright 2026, Beyley Cardellio
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Interface to @ref drv_contactglove.
6 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
7 * @ingroup drv_contactglove
8 */
9
10#pragma once
11
12#include "xrt/xrt_prober.h"
13#include "xrt/xrt_compiler.h"
14
15#include "os/os_serial.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21
22#define CONTACTGLOVE2_VID 0x10c4
23#define CONTACTGLOVE2_PID 0x6b27
24
25enum contactglove_type
26{
27 CONTACTGLOVE_TYPE_CONTACTGLOVE1,
28 CONTACTGLOVE_TYPE_CONTACTGLOVE2,
29};
30
31#define CONTACTGLOVE2_SERIAL_PARAMETERS \
32 XRT_C11_COMPOUND(struct os_serial_parameters) \
33 { \
34 .baud_rate = 115200, .data_bits = 8, .stop_bits = 1, .parity = OS_SERIAL_PARITY_NONE, \
35 }
36
38
40
41int
42contactglove2_found(struct xrt_prober *xp,
43 struct xrt_prober_device **devices,
44 size_t device_count,
45 size_t index,
46 cJSON *attached_data,
47 struct xrt_device **out_xdevs);
48
49int
50contactglove_create(enum contactglove_type type,
51 const char *serial_number,
52 struct os_serial_device *dongle_serial,
53 struct contactglove_dongle **out_dongle,
54 struct xrt_device **out_xdevs);
55
56/*!
57 * Enable pairing mode on the ContactGlove dongle.
58 */
59int
61
62#ifdef __cplusplus
63}
64#endif
int contactglove_dongle_pair(struct contactglove_dongle *dongle)
Enable pairing mode on the ContactGlove dongle.
Definition contactglove.c:1205
Wrapper around OS native serial functions.
A single ContactGlove glove.
Definition contactglove.h:79
A dongle for ContactGlove gloves.
Definition contactglove.h:31
Representing a single serial interface on a device.
Definition os_serial.h:33
A single HMD or input device.
Definition xrt_device.h:311
A probed device, may or may not be opened.
Definition xrt_prober.h:88
The main prober that probes and manages found but not opened HMD devices that are connected to the sy...
Definition xrt_prober.h:135
Header holding common defines.
Common interface to probe for devices.