The open source OpenXR runtime
at main 50 lines 1.1 kB view raw
1// Copyright 2020-2021, N Madsen. 2// Copyright 2020-2021, Collabora, Ltd. 3// Copyright 2020-2023, Jan Schmidt 4// SPDX-License-Identifier: BSL-1.0 5/*! 6 * @file 7 * @brief Driver interface for Bluetooth based WMR motion controllers. 8 * @author Nis Madsen <nima_zero_one@protonmail.com> 9 * @ingroup drv_wmr 10 */ 11#pragma once 12 13#include "os/os_threading.h" 14#include "util/u_logging.h" 15 16#include "wmr_controller_base.h" 17 18#ifdef __cplusplus 19extern "C" { 20#endif 21 22 23/*! 24 * A connection to a Bluetooth connected WMR Controller device 25 * 26 * @ingroup drv_wmr 27 * @implements wmr_controller_connection 28 */ 29struct wmr_bt_connection 30{ 31 struct wmr_controller_connection base; 32 33 enum u_logging_level log_level; 34 35 struct os_hid_device *controller_hid; 36 struct os_thread_helper controller_thread; 37 38 struct os_mutex hid_lock; 39}; 40 41struct xrt_device * 42wmr_bt_controller_create(struct os_hid_device *controller_hid, 43 enum xrt_device_type controller_type, 44 uint16_t vid, 45 uint16_t pid, 46 enum u_logging_level log_level); 47 48#ifdef __cplusplus 49} 50#endif