Przeglądaj źródła

Fixing lsusb error messages

- Instead of stalling at Device Qualification and Debug descriptors, return 0
blockKey
Jacob Alexander 7 lat temu
rodzic
commit
8efeb60aa0
2 zmienionych plików z 10 dodań i 1 usunięć
  1. 7
    0
      Bootloader/usb.c
  2. 3
    1
      Bootloader/usb.h

+ 7
- 0
Bootloader/usb.c Wyświetl plik

default: default:
fail = -1; fail = -1;
break; break;

// Cleanup lsusb errors, just return 0 instead of stalling
case USB_DESC_DEVQUAL:
case USB_DESC_DEBUG:
usb_ep0_tx_cp(&zero16, sizeof(zero16), req->wLength, NULL, NULL);
fail = 0;
break;
} }
/* we set fail already, so we can go directly to `err' */ /* we set fail already, so we can go directly to `err' */
goto err; goto err;

+ 3
- 1
Bootloader/usb.h Wyświetl plik

USB_DESC_EP = 5, USB_DESC_EP = 5,
USB_DESC_DEVQUAL = 6, USB_DESC_DEVQUAL = 6,
USB_DESC_OTHERSPEED = 7, USB_DESC_OTHERSPEED = 7,
USB_DESC_POWER = 8
USB_DESC_POWER = 8,
USB_DESC_OTG = 9,
USB_DESC_DEBUG = 10,
}; };


struct usb_desc_type_t { struct usb_desc_type_t {