Skip to content

Commit

Permalink
[ADAPTER] Add 16/32bits usage page support, fix Stadia rumble
Browse files Browse the repository at this point in the history
  • Loading branch information
darthcloud committed Apr 23, 2024
1 parent 94045c2 commit 8b441de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main/adapter/hid_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct hid_stack_element {
uint32_t report_cnt;
int32_t logical_min;
int32_t logical_max;
uint8_t usage_page;
uint32_t usage_page;
};

static struct hid_report *reports[BT_MAX_DEV][HID_MAX_REPORT] = {0};
Expand Down Expand Up @@ -273,11 +273,11 @@ void hid_parser(struct bt_data *bt_data, uint8_t *data, uint32_t len) {
hid_stack[hid_stack_idx].usage_page = *desc++;
break;
case 0x06: /* USAGE_PAGE16 */
hid_stack[hid_stack_idx].usage_page = 0xFF;
hid_stack[hid_stack_idx].usage_page = *(uint16_t *)desc;
desc += 2;
break;
case 0x07: /* USAGE_PAGE32 */
hid_stack[hid_stack_idx].usage_page = 0xFF;
hid_stack[hid_stack_idx].usage_page = *(uint32_t *)desc;
desc += 4;
break;
case HID_LI_USAGE: /* 0x09 */
Expand Down

0 comments on commit 8b441de

Please sign in to comment.