| 1 | /* |
| 2 | * Copyright 2013, Fredrik Hultin. |
| 3 | * Copyright 2013, Jakob Bornecrantz. |
| 4 | * Copyright 2016 Philipp Zabel |
| 5 | * Copyright 2019-2022 Jan Schmidt |
| 6 | * SPDX-License-Identifier: BSL-1.0 |
| 7 | */ |
| 8 | |
| 9 | /*! |
| 10 | * @file |
| 11 | * @brief Interface to the Oculus Rift S HMD driver code. |
| 12 | * @author Jan Schmidt <[email protected]> |
| 13 | * @ingroup drv_rift_s |
| 14 | */ |
| 15 | |
| 16 | #pragma once |
| 17 | |
| 18 | #include "math/m_imu_3dof.h"cxx . . $ `<file>/src/xrt/auxiliary/math/m_imu_3dof.h`/ |
| 19 | #include "util/u_distortion_mesh.h"cxx . . $ `<file>/src/xrt/auxiliary/util/u_distortion_mesh.h`/ |
| 20 | #include "xrt/xrt_defines.h"cxx . . $ `<file>/src/xrt/include/xrt/xrt_defines.h`/ |
| 21 | #include "xrt/xrt_device.h"cxx . . $ `<file>/src/xrt/include/xrt/xrt_device.h`/ |
| 22 | |
| 23 | #include "rift_s.h"cxx . . $ `<file>/src/xrt/drivers/rift_s/rift_s.h`/ |
| 24 | |
| 25 | /* Oculus Rift S HMD Internal Interface */ |
| 26 | #ifndef RIFT_S_HMD_H |
| 27 | #define RIFT_S_HMD_Hcxx . . $ `src/xrt/drivers/rift_s/rift_s_hmd.h:27:9`! |
| 28 | |
| 29 | struct rift_s_hmdcxx . . $ rift_s_hmd# |
| 30 | { |
| 31 | struct xrt_devicecxx . . $ xrt_device# basecxx . . $ rift_s_hmd#base.; |
| 32 | |
| 33 | struct rift_s_systemcxx . . $ rift_s_system# *syscxx . . $ rift_s_hmd#sys.; |
| 34 | /* HMD config info (belongs to the system, which we have a ref to */ |
| 35 | struct rift_s_hmd_configcxx . . $ rift_s_hmd_config# *configcxx . . $ rift_s_hmd#config.; |
| 36 | |
| 37 | /* Pose tracker provided by the system */ |
| 38 | struct rift_s_trackercxx . . $ rift_s_tracker# *trackercxx . . $ rift_s_hmd#tracker.; |
| 39 | |
| 40 | /* Tracking to extend 32-bit HMD time to 64-bit nanoseconds */ |
| 41 | uint32_tcxx . . $ uint32_t# last_imu_timestamp32cxx . . $ rift_s_hmd#last_imu_timestamp32.; /* 32-bit µS device timestamp */ |
| 42 | timepoint_nscxx . . $ timepoint_ns# last_imu_timestamp_nscxx . . $ rift_s_hmd#last_imu_timestamp_ns.; |
| 43 | |
| 44 | /* Auxiliary state */ |
| 45 | float temperaturecxx . . $ rift_s_hmd#temperature.; |
| 46 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! display_oncxx . . $ rift_s_hmd#display_on.; |
| 47 | |
| 48 | /* Temporary distortion values for mesh calc */ |
| 49 | struct u_panotools_valuescxx . . $ u_panotools_values# distortion_valscxx . . $ rift_s_hmd#distortion_vals.[2]; |
| 50 | }; |
| 51 | |
| 52 | struct rift_s_hmdcxx . . $ rift_s_hmd# * |
| 53 | rift_s_hmd_createcxx . . $ rift_s_hmd_create(2c8aef1fb2dfb23f).(struct rift_s_systemcxx . . $ rift_s_system# *sys, const unsigned char *hmd_serial_no, struct rift_s_hmd_configcxx . . $ rift_s_hmd_config# *config); |
| 54 | void |
| 55 | rift_s_hmd_handle_reportcxx . . $ rift_s_hmd_handle_report(b9b78dbd30032796).(struct rift_s_hmdcxx . . $ rift_s_hmd# *hmd, timepoint_nscxx . . $ timepoint_ns# local_ts, rift_s_hmd_report_tcxx . . $ rift_s_hmd_report_t# *report); |
| 56 | void |
| 57 | rift_s_hmd_set_proximitycxx . . $ rift_s_hmd_set_proximity(73450e40bc3dd877).(struct rift_s_hmdcxx . . $ rift_s_hmd# *hmd, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! prox_sensor); |
| 58 | |
| 59 | #endif |