Skip to content

Commit

Permalink
Remove old usb hack
Browse files Browse the repository at this point in the history
Don't re-configure u2f endpoints every time the host sends a GetDescriptor

(cherry picked from commit c49427f)
  • Loading branch information
yrichard-ledger authored and lpascal-ledger committed Jul 17, 2024
1 parent 8ec3560 commit 92da540
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib_stusb_impl/usbd_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,15 +933,6 @@ uint8_t *USBD_HID_GetReportDescriptor_impl(uint16_t *len)
switch (USBD_Device.request.wIndex & 0xFF) {
#ifdef HAVE_IO_U2F
case U2F_INTF:

// very dirty work due to lack of callback when USB_HID_Init is called
USBD_LL_OpenEP(&USBD_Device, U2F_EPIN_ADDR, USBD_EP_TYPE_INTR, U2F_EPIN_SIZE);

USBD_LL_OpenEP(&USBD_Device, U2F_EPOUT_ADDR, USBD_EP_TYPE_INTR, U2F_EPOUT_SIZE);

/* Prepare Out endpoint to receive 1st packet */
USBD_LL_PrepareReceive(&USBD_Device, U2F_EPOUT_ADDR, U2F_EPOUT_SIZE);

*len = sizeof(HID_ReportDesc_fido);
return (uint8_t *) HID_ReportDesc_fido;
#endif // HAVE_IO_U2F
Expand Down

0 comments on commit 92da540

Please sign in to comment.