From b7881f33fd5b24efaf7d89e98dea28b516f93ba4 Mon Sep 17 00:00:00 2001 From: "kevin.meudic" Date: Thu, 11 Jul 2024 15:42:46 +0200 Subject: [PATCH 1/2] Removed mask to prevent app VID switch during startup --- lib_stusb_impl/usbd_impl.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib_stusb_impl/usbd_impl.c b/lib_stusb_impl/usbd_impl.c index 3f7baf26..50310abd 100644 --- a/lib_stusb_impl/usbd_impl.c +++ b/lib_stusb_impl/usbd_impl.c @@ -761,26 +761,10 @@ static uint8_t const USBD_DeviceDesc[]= { #if defined(HAVE_VID_PID_PROBER) || defined(HAVE_LEGACY_PID) LOBYTE(USBD_PID), /* idProduct */ #else // HAVE_VID_PID_PROBER || defined(HAVE_LEGACY_PID) - LOBYTE(USBD_PID -#ifndef HAVE_USB_HIDKBD - | 0x01 -#else - | 0x02 -#endif -#ifdef HAVE_IO_U2F - | 0x04 -#endif // HAVE_IO_U2F -#ifdef HAVE_USB_CLASS_CCID - | 0x08 -#endif // HAVE_USB_CLASS_CCID -#ifdef HAVE_WEBUSB - | 0x10 -#endif // HAVE_WEBUSB - ), + LOBYTE(USBD_PID), #endif // HAVE_VID_PID_PROBER || HAVE_LEGACY_PID HIBYTE(USBD_PID), /* idProduct */ - // Change this ID to make windows WINUSB/WEBUSB reenumerate when the // descriptor changes and the PID/VID are not changed. 0x01, /* bcdDevice rel. 2.01 */ From ba52e4b223694799da0db87c1ad514b35e328845 Mon Sep 17 00:00:00 2001 From: "kevin.meudic" Date: Thu, 11 Jul 2024 16:48:16 +0200 Subject: [PATCH 2/2] Removed useless code --- lib_stusb_impl/usbd_impl.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib_stusb_impl/usbd_impl.c b/lib_stusb_impl/usbd_impl.c index 50310abd..d8b72150 100644 --- a/lib_stusb_impl/usbd_impl.c +++ b/lib_stusb_impl/usbd_impl.c @@ -758,11 +758,7 @@ static uint8_t const USBD_DeviceDesc[]= { USB_MAX_EP0_SIZE, /* bMaxPacketSize */ LOBYTE(USBD_VID), /* idVendor */ HIBYTE(USBD_VID), /* idVendor */ -#if defined(HAVE_VID_PID_PROBER) || defined(HAVE_LEGACY_PID) LOBYTE(USBD_PID), /* idProduct */ -#else // HAVE_VID_PID_PROBER || defined(HAVE_LEGACY_PID) - LOBYTE(USBD_PID), -#endif // HAVE_VID_PID_PROBER || HAVE_LEGACY_PID HIBYTE(USBD_PID), /* idProduct */ // Change this ID to make windows WINUSB/WEBUSB reenumerate when the