13 #include <asm/byteorder.h> 16 #define VIVE_CONTROLLER_BUTTON_REPORT_ID 0x01 18 #define VIVE_CONTROLLER_USB_BUTTON_TRIGGER (1 << 0) 19 #define VIVE_CONTROLLER_USB_BUTTON_GRIP (1 << 2) 20 #define VIVE_CONTROLLER_USB_BUTTON_MENU (1 << 12) 21 #define VIVE_CONTROLLER_USB_BUTTON_SYSTEM (1 << 13) 22 #define VIVE_CONTROLLER_USB_BUTTON_THUMB (1 << 18) 23 #define VIVE_CONTROLLER_USB_BUTTON_TOUCH (1 << 20) 34 uint16_t battery_voltage;
41 uint16_t trigger_hires;
45 uint8_t maybe_bitfield;
47 } __attribute__((packed));
49 #define VIVE_IMU_RANGE_MODES_REPORT_ID 0x01 57 } __attribute__((packed));
59 #define VIVE_MAINBOARD_STATUS_REPORT_ID 0x03 66 uint16_t lens_separation;
70 uint8_t proximity_change;
74 uint8_t reserved4[46];
75 } __attribute__((packed));
77 #define VIVE_HEADSET_POWER_REPORT_ID 0x04 79 #define VIVE_HEADSET_POWER_REPORT_TYPE 0x2978 87 uint8_t reserved1[32];
89 uint8_t reserved2[18];
90 } __attribute__((packed));
92 #define VIVE_HEADSET_MAINBOARD_DEVICE_INFO_REPORT_ID 0x04 94 #define VIVE_HEADSET_MAINBOARD_DEVICE_INFO_REPORT_TYPE 0x2987 104 uint32_t display_firmware_version;
105 uint8_t unknown2[48];
106 } __attribute__((packed));
108 #define VIVE_FIRMWARE_VERSION_REPORT_ID 0x05 113 uint32_t firmware_version;
117 uint8_t hardware_version_micro;
118 uint8_t hardware_version_minor;
119 uint8_t hardware_version_major;
120 uint8_t hardware_revision;
122 uint8_t fpga_version_minor;
123 uint8_t fpga_version_major;
124 uint8_t reserved[13];
125 } __attribute__((packed));
127 #define VIVE_CONFIG_START_REPORT_ID 0x10 133 } __attribute__((packed));
135 #define VIVE_CONFIG_READ_REPORT_ID 0x11 142 } __attribute__((packed));
144 #define VIVE_IMU_REPORT_ID 0x20 152 } __attribute__((packed));
158 } __attribute__((packed));
160 #define VIVE_CONTROLLER_LIGHTHOUSE_PULSE_REPORT_ID 0x21 167 } __attribute__((packed));
174 } __attribute__((packed));
176 #define VIVE_CONTROLLER_REPORT1_ID 0x23 178 #define VIVE_CONTROLLER_BATTERY_CHARGING 0x80 179 #define VIVE_CONTROLLER_BATTERY_CHARGE_MASK 0x7f 181 #define VIVE_CONTROLLER_BUTTON_TRIGGER 0x01 182 #define VIVE_CONTROLLER_BUTTON_TOUCH 0x02 183 #define VIVE_CONTROLLER_BUTTON_THUMB 0x04 184 #define VIVE_CONTROLLER_BUTTON_SYSTEM 0x08 185 #define VIVE_CONTROLLER_BUTTON_GRIP 0x10 186 #define VIVE_CONTROLLER_BUTTON_MENU 0x20 190 uint8_t timestamp_hi;
192 uint8_t timestamp_lo;
194 } __attribute__((packed));
200 } __attribute__((packed));
202 #define VIVE_CONTROLLER_REPORT2_ID 0x24 208 } __attribute__((packed));
210 #define VIVE_HEADSET_LIGHTHOUSE_PULSE_REPORT_ID 0x25 217 } __attribute__((packed));
223 } __attribute__((packed));
225 #define VIVE_CONTROLLER_DISCONNECT_REPORT_ID 0x26 227 #define VIVE_CONTROLLER_COMMAND_REPORT_ID 0xff 229 #define VIVE_CONTROLLER_HAPTIC_PULSE_COMMAND 0x8f 237 } __attribute__((packed));
239 #define VIVE_CONTROLLER_POWEROFF_COMMAND 0x9f 247 } __attribute__((packed));
251 .id = VIVE_HEADSET_POWER_REPORT_ID,
252 .type = __cpu_to_le16(VIVE_HEADSET_POWER_REPORT_TYPE),
270 .id = VIVE_HEADSET_POWER_REPORT_ID,
271 .type = __cpu_to_le16(VIVE_HEADSET_POWER_REPORT_TYPE),
Definition: vive_protocol.h:162
Definition: vive_protocol.h:110
Definition: vive_protocol.h:204
Definition: vive_protocol.h:241
Definition: vive_protocol.h:169
Definition: vive_protocol.h:129
Definition: vive_protocol.h:51
Definition: vive_protocol.h:96
Definition: vive_protocol.h:137
Definition: vive_protocol.h:196
Definition: vive_protocol.h:81
Definition: vive_protocol.h:146
Definition: vive_protocol.h:212
Definition: vive_protocol.h:231
Definition: vive_protocol.h:219
Definition: vive_protocol.h:188
Definition: vive_protocol.h:154
Definition: vive_protocol.h:61