Monado OpenXR Runtime
Data Structures | Macros | Enumerations | Functions | Variables
u_device.h File Reference

Misc helpers for device drivers. More...

#include "xrt/xrt_compiler.h"
#include "xrt/xrt_device.h"
#include "xrt/xrt_tracking.h"
Include dependency graph for u_device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  u_device_simple_info
 

Macros

#define U_DEVICE_ALLOCATE(type, flags, num_inputs, num_outputs)
 

Enumerations

enum  u_device_alloc_flags { U_DEVICE_ALLOC_HMD = 1 << 0, U_DEVICE_ALLOC_TRACKING_NONE = 1 << 1 }
 

Functions

bool u_device_setup_split_side_by_side (struct xrt_device *xdev, const struct u_device_simple_info *info)
 Setup the device information given a very simple info struct. More...
 
void u_device_dump_config (struct xrt_device *xdev, const char *prefix, const char *prod)
 Dump the device config to stderr. More...
 
void * u_device_allocate (enum u_device_alloc_flags flags, size_t size, size_t num_inputs, size_t num_outputs)
 Helper function to allocate a device plus inputs in the same allocation placed after the device in memory. More...
 
void u_device_free (struct xrt_device *xdev)
 Helper function to free a device and any data hanging of it. More...
 

Variables

const struct xrt_matrix_2x2 u_device_rotation_right
 
const struct xrt_matrix_2x2 u_device_rotation_left
 
const struct xrt_matrix_2x2 u_device_rotation_ident
 
const struct xrt_matrix_2x2 u_device_rotation_180
 

Detailed Description

Misc helpers for device drivers.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

◆ U_DEVICE_ALLOCATE

#define U_DEVICE_ALLOCATE (   type,
  flags,
  num_inputs,
  num_outputs 
)
Value:
((type *)u_device_allocate(flags, sizeof(type), num_inputs, \
num_outputs))
uint16_t type
Definition: vive_protocol.h:210
void * u_device_allocate(enum u_device_alloc_flags flags, size_t size, size_t num_inputs, size_t num_outputs)
Helper function to allocate a device plus inputs in the same allocation placed after the device in me...
Definition: u_device.c:221

Referenced by arduino_device_create(), daydream_device_create(), dummy_hmd_create(), hdk_device_create(), hydra_found(), ns_hmd_create(), oh_device_create(), psvr_device_create(), rs_6dof_create(), vive_controller_found(), and vive_device_create().

Enumeration Type Documentation

◆ u_device_alloc_flags

Enumerator
U_DEVICE_ALLOC_HMD 
U_DEVICE_ALLOC_TRACKING_NONE 

Variable Documentation

◆ u_device_rotation_180

const struct xrt_matrix_2x2 u_device_rotation_180

◆ u_device_rotation_ident

const struct xrt_matrix_2x2 u_device_rotation_ident

◆ u_device_rotation_left

const struct xrt_matrix_2x2 u_device_rotation_left

◆ u_device_rotation_right

const struct xrt_matrix_2x2 u_device_rotation_right