12 #include "xrt/xrt_config_have.h" 17 #ifdef XRT_HAVE_LIBUSB 18 #include <libusb-1.0/libusb.h> 21 #ifdef XRT_HAVE_LIBUVC 22 #include <libuvc/libuvc.h> 32 #define P_SPEW(p, ...) \ 34 if (p->print_spew) { \ 35 fprintf(stderr, "%s - ", __func__); \ 36 fprintf(stderr, __VA_ARGS__); \ 37 fprintf(stderr, "\n"); \ 41 #define P_DEBUG(p, ...) \ 43 if (p->print_debug) { \ 44 fprintf(stderr, "%s - ", __func__); \ 45 fprintf(stderr, __VA_ARGS__); \ 46 fprintf(stderr, "\n"); \ 50 #define P_ERROR(p, ...) \ 52 fprintf(stderr, "%s - ", __func__); \ 53 fprintf(stderr, __VA_ARGS__); \ 54 fprintf(stderr, "\n"); \ 57 #define MAX_AUTO_PROBERS 8 101 #ifdef XRT_HAVE_LIBUSB 111 #ifdef XRT_HAVE_LIBUVC 120 struct prober_v4l *v4ls;
123 struct prober_hidraw *hidraws;
133 #ifdef XRT_HAVE_LIBUSB 137 libusb_device **list;
142 #ifdef XRT_HAVE_LIBUVC 209 #ifdef XRT_HAVE_LIBUSB 211 p_libusb_init(
struct prober *p);
214 p_libusb_teardown(
struct prober *p);
217 p_libusb_probe(
struct prober *p);
220 p_libusb_get_string_descriptor(
struct prober *p,
223 unsigned char *buffer,
230 #ifdef XRT_HAVE_LIBUVC 232 p_libuvc_init(
struct prober *p);
235 p_libuvc_teardown(
struct prober *p);
238 p_libuvc_probe(
struct prober *p);
241 #ifdef XRT_HAVE_LIBUDEV 243 p_udev_probe(
struct prober *p);
int p_tracking_init(struct prober *p)
Init the tracking factory.
Definition: p_tracking.c:236
Auto detect OS and certain features.
xrt_prober_string
String descriptor types.
Definition: xrt_prober.h:103
Common interface to probe for devices.
The main prober that probes and manages found but not opened HMD devices that are connected to the sy...
Definition: xrt_prober.h:147
void p_dump_device(struct prober *p, struct prober_device *pdev, int id)
Dump the given device to stdout.
Definition: p_dump.c:66
Main root of all of the probing device.
Definition: xrt_prober.h:71
A simple prober to probe for a HMD device connected to the system.
Definition: xrt_prober.h:333
void p_tracking_teardown(struct prober *p)
Teardown the tracking factory.
Definition: p_tracking.c:261
Entry for a single device.
Definition: xrt_prober.h:45
A prober device.
Definition: p_prober.h:84
int p_dev_get_usb_dev(struct prober *p, uint16_t bus, uint16_t addr, uint16_t vendor_id, uint16_t product_id, struct prober_device **out_pdev)
Get or create a prober_device from the device.
Definition: p_prober.c:150
Definition: p_prober.h:127
int p_dev_get_bluetooth_dev(struct prober *p, uint64_t id, uint16_t vendor_id, uint16_t product_id, struct prober_device **out_pdev)
Get or create a prober_device from the device.
Definition: p_prober.c:195
Header holding common defines.
A probed device, may or may not be opened.
Definition: xrt_prober.h:121