PSVR device header, imported from OpenHMD.
More...
#include "xrt/xrt_device.h"
#include "xrt/xrt_prober.h"
#include <hidapi/hidapi.h>
Go to the source code of this file.
◆ PSVR_CONTROL_IFACE
#define PSVR_CONTROL_IFACE 5 |
◆ PSVR_DEBUG
#define PSVR_DEBUG |
( |
|
p, |
|
|
|
... |
|
) |
| |
Value:do { \
if (p->print_debug) { \
fprintf(stderr, "%s - ", __func__); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} \
} while (false)
◆ PSVR_ERROR
#define PSVR_ERROR |
( |
|
p, |
|
|
|
... |
|
) |
| |
Value:do { \
fprintf(stderr, "%s - ", __func__); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} while (false)
◆ PSVR_GET_DATA_ID_0x82
#define PSVR_GET_DATA_ID_0x82 0x82 |
◆ PSVR_GET_DATA_ID_CALIBRATION
#define PSVR_GET_DATA_ID_CALIBRATION 0x86 |
◆ PSVR_GET_DATA_ID_DEVICE_NAME
#define PSVR_GET_DATA_ID_DEVICE_NAME 0x80 |
◆ PSVR_HANDLE_IFACE
#define PSVR_HANDLE_IFACE 4 |
◆ PSVR_NS_PER_TICK
#define PSVR_NS_PER_TICK (1000) |
◆ PSVR_PID
◆ PSVR_PKG_0x82
#define PSVR_PKG_0x82 0x82 |
◆ PSVR_PKG_0xA0
#define PSVR_PKG_0xA0 0xA0 |
◆ PSVR_PKG_CALIBRATION
#define PSVR_PKG_CALIBRATION 0x86 |
◆ PSVR_PKG_DEVICE_NAME
#define PSVR_PKG_DEVICE_NAME 0x80 |
◆ PSVR_PKG_STATUS
#define PSVR_PKG_STATUS 0xF0 |
◆ PSVR_SPEW
#define PSVR_SPEW |
( |
|
p, |
|
|
|
... |
|
) |
| |
Value:do { \
if (p->print_spew) { \
fprintf(stderr, "%s - ", __func__); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} \
} while (false)
◆ PSVR_STATUS_VR_MODE_OFF
#define PSVR_STATUS_VR_MODE_OFF 0 |
◆ PSVR_STATUS_VR_MODE_ON
#define PSVR_STATUS_VR_MODE_ON 1 |
◆ PSVR_TICKS_PER_SECOND
#define PSVR_TICKS_PER_SECOND (1000000.0) |
◆ PSVR_VID
◆ psvr_status_bits
Enumerator |
---|
PSVR_STATUS_BIT_POWER | |
PSVR_STATUS_BIT_HMD_WORN | |
PSVR_STATUS_BIT_CINEMATIC_MODE | |
PSVR_STATUS_BIT_UNKNOWN_BIT_3 | |
PSVR_STATUS_BIT_HEADPHONES_CONNECTED | |
PSVR_STATUS_BIT_MUTE_ENABLED | |
PSVR_STATUS_BIT_UNKNOWN_BIT_6 | |
PSVR_STATUS_BIT_UNKNOWN_BIT_7 | |
◆ psvr_device_create()
struct xrt_device* psvr_device_create |
( |
struct hid_device_info * |
hmd_handle_info, |
|
|
struct hid_device_info * |
hmd_control_info, |
|
|
struct xrt_prober * |
xp, |
|
|
bool |
print_spew, |
|
|
bool |
print_debug |
|
) |
| |
◆ psvr_parse_sensor_packet()
bool psvr_parse_sensor_packet |
( |
struct psvr_parsed_sensor * |
sensor, |
|
|
const uint8_t * |
buffer, |
|
|
int |
size |
|
) |
| |
◆ psvr_parse_status_packet()
bool psvr_parse_status_packet |
( |
struct psvr_parsed_status * |
status, |
|
|
const uint8_t * |
buffer, |
|
|
int |
size |
|
) |
| |