Monado OpenXR Runtime
Loading...
Searching...
No Matches
pssense_interface.h
Go to the documentation of this file.
1// Copyright 2023, Collabora, Ltd.
2// Copyright 2023, Jarett Millard
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Interface to @ref drv_pssense
7 * @author Jarett Millard <jarett.millard@gmail.com>
8 * @ingroup drv_pssense
9 */
10
11#pragma once
12
13#include "xrt/xrt_frame.h"
14
16
18
19#include <stdlib.h>
20
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25/*!
26 * @defgroup drv_pssense PlayStation Sense driver
27 * @ingroup drv
28 *
29 * @brief Driver for the PlayStation Sense motion controllers.
30 */
31
32#define PSSENSE_VID 0x054C
33#define PSSENSE_PID_LEFT 0x0E45
34#define PSSENSE_PID_RIGHT 0x0E46
35
36/*!
37 * Create a PlayStation Sense controller device.
38 *
39 * @param xp The prober creating the device.
40 * @param xpdev The prober device.
41 * @param xfctx The frame context.
42 * @param[out] out_timing_sink Optional timing event sink output pointer.
43 *
44 * @ingroup drv_pssense
45 */
46struct xrt_device *
47pssense_create(struct xrt_prober *xp,
48 struct xrt_prober_device *xpdev,
49 struct xrt_frame_context *xfctx,
50 struct t_timing_event_sink **out_timing_sink);
51
52/*!
53 * Add a PlayStation Sense controller device to the constellation tracker.
54 *
55 * @param xdev The PlayStation Sense controller device.
56 * @param tracker The constellation tracker to add the device to.
57 * @return 0 on success, negative error code on failure.
58 *
59 * @ingroup drv_pssense
60 */
61int
62pssense_add_to_constellation_tracker(struct xrt_device *xdev, struct t_constellation_tracker *tracker);
63
64/*!
65 * @dir drivers/pssense
66 *
67 * @brief @ref drv_pssense files.
68 */
69
70#ifdef __cplusplus
71}
72#endif
int pssense_add_to_constellation_tracker(struct xrt_device *xdev, struct t_constellation_tracker *tracker)
Add a PlayStation Sense controller device to the constellation tracker.
Definition pssense_driver.c:1615
struct xrt_device * pssense_create(struct xrt_prober *xp, struct xrt_prober_device *xpdev, struct xrt_frame_context *xfctx, struct t_timing_event_sink **out_timing_sink)
Create a PlayStation Sense controller device.
Definition pssense_driver.c:1392
A time sync sink is a component that receives timing events from a stable timing source,...
Definition t_time_sync.h:69
A single HMD or input device.
Definition xrt_device.h:311
Object used to track all sinks and frame producers in a graph.
Definition xrt_frame.h:108
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 defining the constellation tracker parameters and functions.
Header defining interfaces for time synchronization in Monado.
Data frame header.