10000 Add the missing argument to the HID functions · russbot/circuitpython@ef3a614 · GitHub
[go: up one dir, main page]

Skip to content

Commit ef3a614

Browse files
committed
Add the missing argument to the HID functions
1 parent dafdd24 commit ef3a614

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

shared-module/usb_hid/Device.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ static usb_hid_device_obj_t* get_hid_device(uint8_t report_id) {
7373
}
7474

7575
// Callbacks invoked when receive Get_Report request through control endpoint
76-
uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) {
76+
uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) {
77+
(void) itf;
7778
// only support Input Report
7879
if ( report_type != HID_REPORT_TYPE_INPUT ) return 0;
7980

@@ -83,7 +84,8 @@ uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type,
8384
}
8485

8586
// Callbacks invoked when receive Set_Report request through control endpoint
86-
void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize) {
87+
void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize) {
88+
(void) itf;
8789
if (report_type == HID_REPORT_TYPE_INVALID) {
8890
report_id = buffer[0];
8991
buffer++;

supervisor/shared/usb/usb_desc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index) {
4747
// Invoked when received GET HID REPORT DESCRIPTOR
4848
// Application return pointer to descriptor
4949
// Descriptor contents must exist long enough for transfer to complete
50-
uint8_t const * tud_hid_descriptor_report_cb(void) {
51-
return hid_report_descriptor;
50+
uint8_t const * tud_hid_descriptor_report_cb(uint8_t itf) {
51+
(void) itf;
52+
return hid_report_descriptor;
5253
}
5354
#endif
5455

0 commit comments

Comments
 (0)
0