Monado OpenXR Runtime
Loading...
Searching...
No Matches
rift_interface.h File Reference

Interface to Oculus Rift driver code. More...

#include "xrt/xrt_device.h"
#include "xrt/xrt_defines.h"
#include "xrt/xrt_prober.h"
Include dependency graph for rift_interface.h:

Go to the source code of this file.

Macros

#define OCULUS_VR_VID   0x2833
 
#define OCULUS_DK2_PID   0x0021
 
#define OCULUS_CV1_PID   0x0031
 
#define RIFT_DK2_PRODUCT_STRING   "Rift DK2"
 
#define RIFT_CV1_PRODUCT_STRING   "Rift CV1"
 

Enumerations

enum  rift_variant { RIFT_VARIANT_DK1 , RIFT_VARIANT_DK2 , RIFT_VARIANT_CV1 }
 

Functions

bool rift_is_oculus (struct xrt_prober *xp, struct xrt_prober_device *dev)
 Checks whether the given device is an Oculus device, by checking the manufacturer string.
 
int rift_found (struct xrt_prober *xp, struct xrt_prober_device **devices, size_t device_count, size_t index, cJSON *attached_data, struct xrt_device **out_xdev)
 Probing function for Oculus Rift devices.
 
int rift_devices_create (struct os_hid_device *hmd_dev, struct os_hid_device *radio_dev, enum rift_variant variant, const char *serial_number, struct rift_hmd **out_hmd, struct xrt_device **out_xdevs)
 

Detailed Description

Interface to Oculus Rift driver code.

Author
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com

Function Documentation

◆ rift_found()

int rift_found ( struct xrt_prober xp,
struct xrt_prober_device **  devices,
size_t  device_count,
size_t  index,
cJSON *  attached_data,
struct xrt_device **  out_xdev 
)

Probing function for Oculus Rift devices.

See also
xrt_prober_found_func_t

References xrt_device::hmd, xrt_prober_device::product_id, rift_is_oculus(), and U_LOG_I.

◆ rift_is_oculus()

bool rift_is_oculus ( struct xrt_prober xp,
struct xrt_prober_device dev 
)

Checks whether the given device is an Oculus device, by checking the manufacturer string.

Parameters
xpThe prober to use for getting string descriptors.
devThe device to check.
Returns
true if the device is an Oculus device, false otherwise.

Referenced by rift_found().