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

Interface to Daydream driver code. More...

#include "math/m_api.h"
#include "math/m_imu_pre.h"
#include "math/m_imu_3dof.h"
#include "xrt/xrt_device.h"
#include "os/os_threading.h"
#include "os/os_ble.h"
Include dependency graph for daydream_device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  daydream_parsed_sample
 A parsed sample of accel and gyro. More...
 
struct  daydream_parsed_input
 
struct  daydream_device
 

Macros

#define DAYDREAM_SPEW(c, ...)
 
#define DAYDREAM_DEBUG(c, ...)
 
#define DAYDREAM_ERROR(c, ...)
 

Enumerations

enum  daydream_button_bits {
  DAYDREAM_TOUCHPAD_BUTTON_BIT = 0, DAYDREAM_CIRCLE_BUTTON_BIT = 1, DAYDREAM_BAR_BUTTON_BIT = 2, DAYDREAM_VOLUP_BUTTON_BIT = 3,
  DAYDREAM_VOLDN_BUTTON_BIT = 4
}
 
enum  daydream_button_masks {
  DAYDREAM_TOUCHPAD_BUTTON_MASK = 1 << DAYDREAM_TOUCHPAD_BUTTON_BIT, DAYDREAM_CIRCLE_BUTTON_MASK = 1 << DAYDREAM_CIRCLE_BUTTON_BIT, DAYDREAM_BAR_BUTTON_MASK = 1 << DAYDREAM_BAR_BUTTON_BIT, DAYDREAM_VOLUP_BUTTON_MASK = 1 << DAYDREAM_VOLUP_BUTTON_BIT,
  DAYDREAM_VOLDN_BUTTON_MASK = 1 << DAYDREAM_VOLDN_BUTTON_BIT
}
 

Functions

struct daydream_devicedaydream_device_create (struct os_ble_device *ble, bool print_spew, bool print_debug)
 

Detailed Description

Interface to Daydream driver code.

Author
Pete Black pete..nosp@m.blac.nosp@m.k@col.nosp@m.labo.nosp@m.ra.co.nosp@m.m

Macro Definition Documentation

◆ DAYDREAM_DEBUG

#define DAYDREAM_DEBUG (   c,
  ... 
)
Value:
do { \
if (c->print_debug) { \
fprintf(stderr, "%s - ", __func__); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} \
} while (false)

◆ DAYDREAM_ERROR

#define DAYDREAM_ERROR (   c,
  ... 
)
Value:
do { \
fprintf(stderr, "%s - ", __func__); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} while (false)

◆ DAYDREAM_SPEW

#define DAYDREAM_SPEW (   c,
  ... 
)
Value:
do { \
if (c->print_spew) { \
fprintf(stderr, "%s - ", __func__); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
} \
} while (false)

Enumeration Type Documentation

◆ daydream_button_bits

Enumerator
DAYDREAM_TOUCHPAD_BUTTON_BIT 
DAYDREAM_CIRCLE_BUTTON_BIT 
DAYDREAM_BAR_BUTTON_BIT 
DAYDREAM_VOLUP_BUTTON_BIT 
DAYDREAM_VOLDN_BUTTON_BIT 

◆ daydream_button_masks

Enumerator
DAYDREAM_TOUCHPAD_BUTTON_MASK 
DAYDREAM_CIRCLE_BUTTON_MASK 
DAYDREAM_BAR_BUTTON_MASK 
DAYDREAM_VOLUP_BUTTON_MASK 
DAYDREAM_VOLDN_BUTTON_MASK 

Function Documentation

◆ daydream_device_create()

struct daydream_device* daydream_device_create ( struct os_ble_device ble,
bool  print_spew,
bool  print_debug 
)