wmr.h 840 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2018, Philipp Zabel.
  2. // SPDX-License-Identifier: BSL-1.0
  3. /*
  4. * OpenHMD - Free and Open Source API and drivers for immersive technology.
  5. */
  6. /* Windows Mixed Reality Driver */
  7. #ifndef WMR_H
  8. #define WMR_H
  9. #include <stdint.h>
  10. #include <stdbool.h>
  11. #include "../openhmdi.h"
  12. typedef enum
  13. {
  14. HOLOLENS_IRQ_SENSORS = 1,
  15. HOLOLENS_IRQ_CONTROL = 2
  16. } hololens_sensors_irq_cmd;
  17. typedef struct
  18. {
  19. uint8_t id;
  20. uint16_t temperature[4];
  21. uint64_t gyro_timestamp[4];
  22. int16_t gyro[3][32];
  23. uint64_t accel_timestamp[4];
  24. int32_t accel[3][4];
  25. uint64_t video_timestamp[4];
  26. } hololens_sensors_packet;
  27. static const unsigned char hololens_sensors_imu_on[64] = {
  28. 0x02, 0x07
  29. };
  30. bool hololens_sensors_decode_packet(hololens_sensors_packet* pkt, const unsigned char* buffer, int size);
  31. #endif