File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,21 @@ bool USBHID::ready(void){
310
310
return tud_hid_n_ready (0 );
311
311
}
312
312
313
- void tud_hid_report_complete_cb (uint8_t instance, uint8_t const * report, uint8_t len){
313
+ // TinyUSB is in the process of changing the type of the last argument to
314
+ // tud_hid_report_complete_cb(), so extract the type from the version of TinyUSB that we're
315
+ // compiled with.
316
+ template <class F > struct ArgType ;
317
+
318
+ template <class R , class T1 , class T2 , class T3 >
319
+ struct ArgType <R(*)(T1, T2, T3)> {
320
+ typedef T1 type1;
321
+ typedef T2 type2;
322
+ typedef T3 type3;
323
+ };
324
+
325
+ typedef ArgType<decltype(&tud_hid_report_complete_cb)>::type3 tud_hid_report_complete_cb_len_t ;
326
+
327
+ void tud_hid_report_complete_cb (uint8_t instance, uint8_t const * report, tud_hid_report_complete_cb_len_t len){
314
328
if (tinyusb_hid_device_input_sem) {
315
329
xSemaphoreGive (tinyusb_hid_device_input_sem);
316
330
}
You can’t perform that action at this time.
0 commit comments