1
0
Fork 0

[Mouse] Add 32 buttons for mouse reports

Because why the fuck not
This commit is contained in:
Drashna Jael're 2024-11-12 08:06:17 -08:00
parent 45573eb441
commit 8e0560e4d3
Signed by: drashna
GPG key ID: DBA1FD3A860D1B11
4 changed files with 7 additions and 7 deletions

View file

@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// clang-format off
/* HID report IDs */
enum hid_report_ids {
enum hid_report_ids {
REPORT_ID_ALL = 0,
REPORT_ID_KEYBOARD = 1,
REPORT_ID_MOUSE,
@ -209,7 +209,7 @@ typedef struct {
#ifdef MOUSE_SHARED_EP
uint8_t report_id;
#endif
uint8_t buttons;
uint32_t buttons;
#ifdef MOUSE_EXTENDED_REPORT
int8_t boot_x;
int8_t boot_y;

View file

@ -135,10 +135,10 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = {
// Buttons (8 bits)
HID_RI_USAGE_PAGE(8, 0x09), // Button
HID_RI_USAGE_MINIMUM(8, 0x01), // Button 1
HID_RI_USAGE_MAXIMUM(8, 0x08), // Button 8
HID_RI_USAGE_MAXIMUM(8, 0x20), // Button 8
HID_RI_LOGICAL_MINIMUM(8, 0x00),
HID_RI_LOGICAL_MAXIMUM(8, 0x01),
HID_RI_REPORT_COUNT(8, 0x08),
HID_RI_REPORT_COUNT(8, 0x20),
HID_RI_REPORT_SIZE(8, 0x01),
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE),