|
|
|
@ -5,6 +5,7 @@ |
|
|
|
|
#include <libusb.h> |
|
|
|
|
#include <wchar.h> |
|
|
|
|
#include <string.h> |
|
|
|
|
#include <stdbool.h> |
|
|
|
|
|
|
|
|
|
#define DEVICE_VENDOR_ID 0x33e4 |
|
|
|
|
#define DEVICE_PRODUCT_ID_WIRED 0x5708 |
|
|
|
@ -25,6 +26,7 @@ |
|
|
|
|
#define REPORT_MOTION_SYNC_SIZE 0x1 |
|
|
|
|
#define REPORT_UNKNOWN_6_SIZE 0x5 |
|
|
|
|
#define REPORT_BATTERY_SIZE 0x2 |
|
|
|
|
#define REPORT_WIRELESS_MOUSE_SIZE 0x1 |
|
|
|
|
|
|
|
|
|
#define COMMAND_UNKNOWN_0 0x82 |
|
|
|
|
#define COMMAND_DPI_SETTINGS 0x83 |
|
|
|
@ -36,6 +38,7 @@ |
|
|
|
|
#define COMMAND_MOTION_SYNC 0x91 |
|
|
|
|
#define COMMAND_UNKNOWN_6 0x98 |
|
|
|
|
#define COMMAND_BATTERY 0x8F |
|
|
|
|
#define COMMAND_WIRELESS_MOUSE 0x90 // -> send the next report to mouse, checking if mouse is connected
|
|
|
|
|
|
|
|
|
|
typedef struct HTX_DPI_LEVEL |
|
|
|
|
{ |
|
|
|
@ -57,7 +60,7 @@ typedef struct HTX_REPORT_HEADER |
|
|
|
|
|
|
|
|
|
uint8_t report_size; // report size, after header
|
|
|
|
|
uint8_t command; // COMMAND
|
|
|
|
|
uint8_t zero; // report ? other ?
|
|
|
|
|
uint8_t wireless; // 0 on wired, 1 on wireless
|
|
|
|
|
} __attribute__((packed)) htx_report_header_t; |
|
|
|
|
|
|
|
|
|
struct HTX_REPORT_DPI_SETTINGS |
|
|
|
@ -156,3 +159,11 @@ struct HTX_REPORT_BATTERY |
|
|
|
|
|
|
|
|
|
uint8_t zeros[REPORT_MAX_SIZE - sizeof(htx_report_header_t) - 2]; |
|
|
|
|
} __attribute__((packed)); |
|
|
|
|
|
|
|
|
|
struct HTX_REPORT_WIRELESS |
|
|
|
|
{ |
|
|
|
|
htx_report_header_t header; |
|
|
|
|
|
|
|
|
|
uint8_t mouse_connected; // 0 if disconnected, else 1
|
|
|
|
|
uint8_t zeros[REPORT_MAX_SIZE - sizeof(htx_report_header_t) - 1]; |
|
|
|
|
} __attribute__((packed)); |
|
|
|
|