@@ -352,6 +352,29 @@ static inline bool tud_hid_gamepad_report(uint8_t report_id, int8_t x, int8_t y
352
352
HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\
353
353
HID_COLLECTION_END \
354
354
355
+ // FIDO U2F Authenticator Descriptor Template
356
+ #define TUD_HID_REPORT_DESC_FIDO_U2F (...) \
357
+ HID_USAGE_PAGE_N ( HID_USAGE_PAGE_FIDO_ALLIANCE , 2 ) ,\
358
+ HID_USAGE ( HID_USAGE_FIDO_U2F_AUTHENTICATOR_DEVICE ) ,\
359
+ HID_COLLECTION ( HID_COLLECTION_APPLICATION ) ,\
360
+ /* Report ID if any */ \
361
+ __VA_ARGS__ \
362
+ /* Usage Data In */ \
363
+ HID_USAGE ( HID_USAGE_FIDO_INPUT_REPORT_DATA ) ,\
364
+ HID_LOGICAL_MIN ( 0 ) ,\
365
+ HID_LOGICAL_MAX_N ( 255 , 2 ) ,\
366
+ HID_REPORT_SIZE ( 8 ) ,\
367
+ HID_REPORT_COUNT ( 64 ) ,\
368
+ HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\
369
+ /* Usage Data Out */ \
370
+ HID_USAGE ( HID_USAGE_FIDO_OUTPUT_REPORT_DATA ) ,\
371
+ HID_LOGICAL_MIN ( 0 ) ,\
372
+ HID_LOGICAL_MAX_N ( 255 , 2 ) ,\
373
+ HID_REPORT_SIZE ( 8 ) ,\
374
+ HID_REPORT_COUNT ( 64 ) ,\
375
+ HID_OUTPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\
376
+ HID_COLLECTION_END \
377
+
355
378
// HID Generic Input & Output
356
379
// - 1st parameter is report size (mandatory)
357
380
// - 2nd parameter is report id HID_REPORT_ID(n) (optional)
0 commit comments