Monado OpenXR Runtime
|
Driver for a Sample HMD. More...
Files | |
file | sample_hmd.c |
Sample HMD device, use as a starting point to make your own device driver. | |
file | sample_interface.h |
Interface to Sample HMD driver. | |
file | sample_prober.c |
"auto-prober" for Sample HMD that can be autodetected but not through USB VID/PID. | |
Functions | |
struct xrt_auto_prober * | sample_create_auto_prober (void) |
Create a auto prober for a Sample HMD. More... | |
struct xrt_device * | sample_hmd_create (void) |
Create a Sample HMD. More... | |
Driver for a Sample HMD.
Does no actual work. Assumed to not be detectable by USB VID/PID, and thus exposes an "auto-prober" to explicitly discover the device.
See Writing a new driver for additional information.
This device has an implementation of xrt_auto_prober to perform hardware detection, as well as an implementation of xrt_device for the actual device.
If your device is or has USB HID that can be detected based on USB VID/PID, you can skip the xrt_auto_prober implementation, and instead implement a "found" function that matches the signature expected by xrt_prober_entry::found. See for example hdk_found. Alternately, you might create a builder or an instance implementation directly.
struct xrt_auto_prober * sample_create_auto_prober | ( | void | ) |
#include <drivers/sample/sample_interface.h>
Create a auto prober for a Sample HMD.
References xrt_auto_prober::destroy, xrt_auto_prober::lelo_dallas_autoprobe, and U_TYPED_CALLOC.
struct xrt_device * sample_hmd_create | ( | void | ) |
#include <drivers/sample/sample_interface.h>
Create a Sample HMD.
This is only exposed so that the prober (in one source file) can call the construction function (in another)