Monado OpenXR Runtime
psvr2_protocol.h File Reference

PSVR2 HMD protocol defines. More...

Go to the source code of this file.

Data Structures

struct  imu_record
 
struct  imu_usb_record
 
struct  status_record_hdr
 
struct  slam_usb_record
 
struct  sie_ctrl_pkt
 

Macros

#define PSVR2_SLAM_INTERFACE   3
 
#define PSVR2_SLAM_ENDPOINT   3
 
#define PSVR2_GAZE_INTERFACE   5
 
#define PSVR2_GAZE_ENDPOINT   0x85
 
#define PSVR2_CAMERA_INTERFACE   6
 
#define PSVR2_CAMERA_ENDPOINT   7
 
#define PSVR2_STATUS_INTERFACE   7
 
#define PSVR2_STATUS_ENDPOINT   8
 
#define PSVR2_LD_INTERFACE   8
 
#define PSVR2_LD_ENDPOINT   9
 
#define PSVR2_RP_INTERFACE   9
 
#define PSVR2_RP_ENDPOINT   10
 
#define PSVR2_VD_INTERFACE   10
 
#define PSVR2_VD_ENDPOINT   11
 
#define USB_SLAM_XFER_SIZE   1024
 
#define USB_STATUS_XFER_SIZE   1024
 
#define USB_GAZE_XFER_SIZE   32768
 
#define USB_CAM_MODE10_XFER_SIZE   1040640
 
#define USB_CAM_MODE1_XFER_SIZE   819456
 
#define USB_LD_XFER_SIZE   36944
 
#define USB_RP_XFER_SIZE   821120
 
#define USB_VD_XFER_SIZE   32768
 
#define SERIAL_LENGTH   14
 
#define GYRO_SCALE   (2000.0 / 32767.0)
 
#define ACCEL_SCALE   (4.0 * MATH_GRAVITY_M_S2 / 32767.0)
 
#define IMU_FREQ   2000.0f
 
#define IMU_PERIOD_NS   ((time_duration_ns)(1000000000.0f / IMU_FREQ))
 

Enumerations

enum  psvr2_report_id {
  PSVR2_REPORT_ID_SET_PERIPHERAL = 0x8 , PSVR2_REPORT_ID_SET_CAMERA_MODE = 0xB , PSVR2_REPORT_ID_SET_GAZE_STREAM = 0xC , PSVR2_REPORT_ID_SET_GAZE_USER_CALIBRATION = 0xD ,
  PSVR2_REPORT_ID_SET_BRIGHTNESS = 0x12
}
 
enum  psvr2_gaze_stream_subcommand { PSVR2_GAZE_STREAM_SUBCMD_ENABLE = 0x01 , PSVR2_GAZE_STREAM_SUBCMD_DISABLE = 0x02 }
 
enum  psvr2_set_peripheral_subcommand { PSVR2_SET_PERIPHERAL_SUBCMD_MOTOR = 0x01 }
 
enum  psvr2_camera_mode {
  PSVR2_CAMERA_MODE_OFF = 0 , PSVR2_CAMERA_MODE_BOTTOM_SBS_CROPPED = 1 , PSVR2_CAMERA_MODE_2 = 2 , PSVR2_CAMERA_MODE_3 = 3 ,
  PSVR2_CAMERA_MODE_4 = 4 , PSVR2_CAMERA_MODE_400_200_DARK = 5 , PSVR2_CAMERA_MODE_EYE_CAMERAS = 6 , PSVR2_CAMERA_MODE_7 = 7 ,
  PSVR2_CAMERA_MODE_8 = 8 , PSVR2_CAMERA_MODE_9 = 9 , PSVR2_CAMERA_MODE_10 = 0xa , PSVR2_CAMERA_MODE_11 = 0xb ,
  PSVR2_CAMERA_MODE_12 = 0xc , PSVR2_CAMERA_MODE_13 = 0xd , PSVR2_CAMERA_MODE_14 = 0xe , PSVR2_CAMERA_MODE_15 = 0xf ,
  PSVR2_CAMERA_MODE_BOTTOM_SBS_BC4 = 0x10
}
 

Functions

struct imu_usb_record __attribute__ ((packed))
 

Variables

__le32 vts_us
 
__le16 accel [3]
 
__le16 gyro [3]
 
__le16 dp_frame_cnt
 
__le16 dp_line_cnt
 
__le16 imu_ts_us
 
__le16 status
 
uint8_t dprx_status
 
uint8_t prox_sensor_flag
 
uint8_t function_button
 
uint8_t empty0 [2]
 
uint8_t ipd_dial_mm
 
uint8_t remainder [26]
 
char SLAhdr [3]
 
uint8_t const1
 
__le32 pkt_size
 
__le32 vts_ts_us
 
__le32 unknown1
 
__lef32 pos [3]
 
__lef32 orient [4]
 
__le16 report_id
 
__le16 subcmd
 
__le32 len
 
uint8_t data [512 - 8]
 
enum psvr2_camera_mode __attribute__
 

Detailed Description