-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We right now have static simple hid descriptors defined for mouse and keyboard, but some targets might want slightly different reports. For instance, 5 buttons instead of 3, pan in addition to wheel, 16 bit xy deltas.
This could always be done target side, but we could use the preprocessor to do this:
struct mouse_report {
u8 id;
#if defined(MOUSE_REPORT_16BIT_DELTA)
s16 x;
s16 y;
#else
s8 x;
s8 y;
#endif
s8 wheel;
#if defined(MOUSE_REPORT_PAN)
s8 wheel;
#endif
u8 button1 : 1;
u8 button2 : 1;
u8 button3 : 1;
#if defined(MOUSE_REPORT_5BUTTONS)
u8 button4 : 1;
u8 button5 : 1;
#endif
} __attribute__((__packed__))
(same for the actual report descriptor)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request