Christina Quast
49ba6bc1ba
Fixed change usb config bug
...
In the standard atmel lib only one configuration was possible.
On a GETDESCRIPTOR request the board would always return the full buffer
with both configurations.
The USB driver requests each configuration one after another, using the
configuration index number.
The atmel lib did not support more than one USB configuration.
2015-02-20 14:35:36 +01:00
Christina Quast
6255ccca84
USB driver send standard configuration
...
One configuration, one Interface, two endpoints (bulk in and out)
We don't need to configure Endpoint 0 which is always the control
endpoint and configured before any descriptor requests take place.
% python usb_enum.py
Found device
CONFIGURATION 2: 100 mA ==================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x2 Configuration
wTotalLength : 0x20 (32 bytes)
bNumInterfaces : 0x1
bConfigurationValue : 0x2
iConfiguration : 0x2 SOME
bmAttributes : 0x80 Bus Powered
bMaxPower : 0x32 (100 mA)
INTERFACE 0: Vendor Specific ===========================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x0
bAlternateSetting : 0x0
bNumEndpoints : 0x2
bInterfaceClass : 0xff Vendor Specific
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x1 SIMTRACE~~~~~
ENDPOINT 0x1: Bulk OUT ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x1 OUT
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x0
ENDPOINT 0x82: Bulk IN ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x82 IN
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x40 (64 bytes)
bInterval : 0x0
2015-02-10 20:45:08 +01:00