Monado OpenXR Runtime
psvr2.h File Reference

PSVR2 HMD device. More...

#include <xrt/xrt_defines.h>
#include <xrt/xrt_byte_order.h>
#include "xrt/xrt_device.h"
#include "xrt/xrt_prober.h"
#include "xrt/xrt_tracking.h"
#include "os/os_threading.h"
#include "os/os_time.h"
#include "math/m_api.h"
#include "math/m_clock_tracking.h"
#include "math/m_mathinclude.h"
#include "math/m_relation_history.h"
#include "math/m_filter_one_euro.h"
#include "math/m_filter_fifo.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_device.h"
#include "util/u_distortion_mesh.h"
#include "util/u_frame.h"
#include "util/u_logging.h"
#include "util/u_sink.h"
#include "util/u_time.h"
#include "util/u_trace_marker.h"
#include "util/u_var.h"
#include "psvr2_protocol.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <libusb.h>
Include dependency graph for psvr2.h:

Go to the source code of this file.

Data Structures

struct  psvr2_hmd
 PSVR2 HMD device. More...
 

Macros

#define NUM_CAM_XFERS   1
 
#define PSVR2_TRACE(p, ...)   U_LOG_XDEV_IFL_T(&p->base, p->log_level, __VA_ARGS__)
 
#define PSVR2_TRACE_HEX(p, data, data_size)   U_LOG_XDEV_IFL_T_HEX(&p->base, p->log_level, data, data_size)
 
#define PSVR2_DEBUG(p, ...)   U_LOG_XDEV_IFL_D(&p->base, p->log_level, __VA_ARGS__)
 
#define PSVR2_DEBUG_HEX(p, data, data_size)   U_LOG_XDEV_IFL_D_HEX(&p->base, p->log_level, data, data_size)
 
#define PSVR2_WARN(p, ...)   U_LOG_XDEV_IFL_W(&p->base, p->log_level, __VA_ARGS__)
 
#define PSVR2_ERROR(p, ...)   U_LOG_XDEV_IFL_E(&p->base, p->log_level, __VA_ARGS__)
 
#define TIMESTAMP_SAMPLES   100
 

Enumerations

enum  psvr2_hmd_input_name { PSVR2_HMD_INPUT_HEAD_POSE , PSVR2_HMD_INPUT_FUNCTION_BUTTON , PSVR2_HMD_INPUT_COUNT }
 

Functions

static struct psvr2_hmdpsvr2_hmd (struct xrt_device *xdev)
 Casting helper function. More...
 
void psvr2_compute_distortion_asymmetric (float *calibration, struct xrt_uv_triplet *distCoords, int eEye, float fU, float fV)
 
bool psvr2_usb_xfer_continue (struct libusb_transfer *xfer, const char *type)
 
bool send_psvr2_control (struct psvr2_hmd *hmd, uint16_t report_id, uint8_t subcmd, uint8_t *pkt_data, uint32_t pkt_len)
 

Detailed Description

Function Documentation

◆ psvr2_hmd()

static struct psvr2_hmd * psvr2_hmd ( struct xrt_device xdev)
inlinestatic

Casting helper function.