[FL-3113] BadUSB: disable CDC mode, USB mode switch fix (#2394)

This commit is contained in:
Nikolay Minaylov
2023-02-13 18:43:29 +03:00
committed by GitHub
parent d0c6c3402c
commit bc06d407f3
4 changed files with 12 additions and 5 deletions

View File

@@ -340,7 +340,7 @@ static void usb_process_mode_start(FuriHalUsbInterface* interface, void* context
}
static void usb_process_mode_change(FuriHalUsbInterface* interface, void* context) {
if(interface != usb.interface) {
if((interface != usb.interface) || (context != usb.interface_context)) {
if(usb.enabled) {
// Disable current interface
susp_evt(&udev, 0, 0);