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))
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