summaryrefslogtreecommitdiff
path: root/hw/usb/hid-logitech-dj.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/hid-logitech-dj.h')
-rw-r--r--hw/usb/hid-logitech-dj.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/hw/usb/hid-logitech-dj.h b/hw/usb/hid-logitech-dj.h
index 04a31c95a3..6a2ca18413 100644
--- a/hw/usb/hid-logitech-dj.h
+++ b/hw/usb/hid-logitech-dj.h
@@ -73,6 +73,18 @@ typedef struct {
typedef struct {
uint8_t report_id;
+ const uint8_t device_index;
+ const uint8_t feat_index;
+ const uint8_t func; /* function/ASE ID | sw ID */
+ union {
+ uint8_t params[16];
+ uint8_t params_s[3];
+ };
+} Hidpp20Msg;
+
+
+typedef struct {
+ uint8_t report_id;
uint8_t device_index;
uint8_t report_type;
uint8_t payload[12];
@@ -99,11 +111,7 @@ typedef struct {
};
} HidppMsg;
-/* information to generate an error output report */
-typedef struct {
- uint8_t device_index;
- uint8_t sub_id;
- uint8_t address;
+/* HID++ 1.0 error codes */
#define HIDPP_ERR_SUCCESS 0x00
#define HIDPP_ERR_INVALID_SUBID 0x01
#define HIDPP_ERR_INVALID_ADDRESS 0x02
@@ -117,8 +125,17 @@ typedef struct {
#define HIDPP_ERR_REQUEST_UNAVAILABLE 0x0A
#define HIDPP_ERR_INVALID_PARAM_VALUE 0x0B
#define HIDPP_ERR_WRONG_PIN_CODE 0x0C
- uint8_t error;
-} HidppError;
+/* HID++ 2.0 error codes */
+#define HIDPP20_ERR_CODE_NOERROR 0x00
+#define HIDPP20_ERR_CODE_UNKNOWN 0x01
+#define HIDPP20_ERR_CODE_INVALIDARGUMENT 0x02
+#define HIDPP20_ERR_CODE_OUTOFRANGE 0x03
+#define HIDPP20_ERR_CODE_HWERROR 0x04
+#define HIDPP20_ERR_CODE_LOGITECH_INTERNAL 0x05
+#define HIDPP20_ERR_CODE_INVALID_FEATURE_INDEX 0x06
+#define HIDPP20_ERR_CODE_INVALID_FUNCTION_ID 0x07
+#define HIDPP20_ERR_CODE_BUSY 0x08
+#define HIDPP20_ERR_CODE_UNSUPPORTED 0x09
/* device and receiver info */