Monado OpenXR Runtime

Common vive header. More...

#include <stdint.h>
#include <asm/byteorder.h>
#include "util/u_debug.h"
#include "util/u_time.h"
Include dependency graph for vive.h:

Go to the source code of this file.

Macros

#define VIVE_TRACE(d, ...)   U_LOG_IFL_T(d->log_level, __VA_ARGS__)
 
#define VIVE_DEBUG(d, ...)   U_LOG_IFL_D(d->log_level, __VA_ARGS__)
 
#define VIVE_INFO(d, ...)   U_LOG_IFL_I(d->log_level, __VA_ARGS__)
 
#define VIVE_WARN(d, ...)   U_LOG_IFL_W(d->log_level, __VA_ARGS__)
 
#define VIVE_ERROR(d, ...)   U_LOG_IFL_E(d->log_level, __VA_ARGS__)
 
#define VIVE_CLOCK_FREQ   48e6
 
#define CAMERA_FREQUENCY   54
 
#define IMU_FREQUENCY   1000
 

Functions

static void ticks_to_ns (uint32_t sample_ticks_raw, uint32_t *inout_prev_ticks, timepoint_ns *inout_ts_ns)
 Helper function to convert raw device ticks to nanosecond timestamps. More...
 

Detailed Description

Function Documentation

◆ ticks_to_ns()

static void ticks_to_ns ( uint32_t  sample_ticks_raw,
uint32_t *  inout_prev_ticks,
timepoint_ns inout_ts_ns 
)
inlinestatic

Helper function to convert raw device ticks to nanosecond timestamps.

inout params should start as the results from the previous sample call. For the first call, pass zero for the inout params.

Parameters
sample_ticks_rawCurrent sample ticks
[in,out]inout_prev_ticksOverwritten with sample_ticks_raw
[in,out]inout_ts_nsResulting timestamp in nanoseconds