Monado OpenXR Runtime
psvr_device.h File Reference

PSVR device header, imported from OpenHMD. More...

#include "xrt/xrt_device.h"
#include "xrt/xrt_prober.h"
#include "util/u_logging.h"
#include <hidapi.h>
Include dependency graph for psvr_device.h:

Go to the source code of this file.

Data Structures

struct  psvr_parsed_sample
 A parsed single gyro, accel and tick sample. More...
 
struct  psvr_parsed_sensor
 Over the wire sensor packet from the headset. More...
 
struct  psvr_parsed_status
 A status packet from the headset in wire format. More...
 

Macros

#define PSVR_HANDLE_IFACE   4
 
#define PSVR_CONTROL_IFACE   5
 
#define PSVR_STATUS_VR_MODE_OFF   0
 
#define PSVR_STATUS_VR_MODE_ON   1
 
#define PSVR_TICKS_PER_SECOND   (1000000.0)
 
#define PSVR_NS_PER_TICK   (1000)
 
#define PSVR_PKG_STATUS   0xF0
 
#define PSVR_PKG_DEVICE_NAME   0x80
 
#define PSVR_PKG_CALIBRATION   0x86
 
#define PSVR_PKG_0xA0   0xA0
 
#define PSVR_PKG_0x82   0x82
 
#define PSVR_GET_DATA_ID_DEVICE_NAME   0x80
 
#define PSVR_GET_DATA_ID_CALIBRATION   0x86
 
#define PSVR_GET_DATA_ID_0x82   0x82
 

Enumerations

enum  psvr_status_bits {
  PSVR_STATUS_BIT_POWER = (1 << 0) , PSVR_STATUS_BIT_HMD_WORN = (1 << 1) , PSVR_STATUS_BIT_CINEMATIC_MODE = (1 << 2) , PSVR_STATUS_BIT_UNKNOWN_BIT_3 = (1 << 3) ,
  PSVR_STATUS_BIT_HEADPHONES_CONNECTED = (1 << 4) , PSVR_STATUS_BIT_MUTE_ENABLED = (1 << 5) , PSVR_STATUS_BIT_UNKNOWN_BIT_6 = (1 << 6) , PSVR_STATUS_BIT_UNKNOWN_BIT_7 = (1 << 7)
}
 

Functions

struct xrt_devicepsvr_device_create_auto_prober (struct hid_device_info *sensor_hid_info, struct hid_device_info *control_hid_info, struct xrt_tracked_psvr *tracker, enum u_logging_level log_level)
 
bool psvr_parse_sensor_packet (struct psvr_parsed_sensor *sensor, const uint8_t *buffer, int size)
 
bool psvr_parse_status_packet (struct psvr_parsed_status *status, const uint8_t *buffer, int size)
 

Detailed Description