X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/9b2011455585885748164ab76dfaae76fffb0ff9..05fcf7e2a79bebb978d4aeaef26b12f70c6826f8:/Projects/Incomplete/StandaloneProgrammer/Descriptors.c diff --git a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c index 71198e082..abc981426 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c +++ b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c @@ -37,6 +37,8 @@ #include "Descriptors.h" +#if defined(USB_CAN_BE_DEVICE) + /* On some devices, there is a factory set internal serial number which can be automatically sent to the host as * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL. * This allows the host to track a device across insertions on different ports, allowing them to retain allocated @@ -67,7 +69,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = .VendorID = 0x03EB, .ProductID = 0x2063, - .ReleaseNumber = 0x0000, + .ReleaseNumber = 0x0001, .ManufacturerStrIndex = 0x01, .ProductStrIndex = 0x02, @@ -88,7 +90,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), - .TotalInterfaces = 3, + .TotalInterfaces = 1, .ConfigurationNumber = 1, .ConfigurationStrIndex = NO_DESCRIPTOR, @@ -97,120 +99,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = .MaxPowerConsumption = USB_CONFIG_POWER_MA(100) }, - - .CDC_IAD = - { - .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation}, - - .FirstInterfaceIndex = 0, - .TotalInterfaces = 2, - - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0x01, - - .IADStrIndex = NO_DESCRIPTOR - }, - - .CCI_Interface = - { - .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - - .InterfaceNumber = 0, - .AlternateSetting = 0, - - .TotalEndpoints = 1, - - .Class = 0x02, - .SubClass = 0x02, - .Protocol = 0x01, - - .InterfaceStrIndex = NO_DESCRIPTOR - }, - - .CDC_Functional_IntHeader = - { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x00, - - .Data = {0x01, 0x10} - }, - - .CDC_Functional_CallManagement = - { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x01, - - .Data = {0x03, 0x01} - }, - - .CDC_Functional_AbstractControlManagement = - { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, - .SubType = 0x02, - - .Data = {0x06} - }, - - .CDC_Functional_Union = - { - .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, - .SubType = 0x06, - - .Data = {0x00, 0x01} - }, - - .ManagementEndpoint = - { - .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - - .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM), - .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), - .EndpointSize = CDC_NOTIFICATION_EPSIZE, - .PollingIntervalMS = 0xFF - }, - - .DCI_Interface = - { - .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - - .InterfaceNumber = 1, - .AlternateSetting = 0, - - .TotalEndpoints = 2, - - .Class = 0x0A, - .SubClass = 0x00, - .Protocol = 0x00, - - .InterfaceStrIndex = NO_DESCRIPTOR - }, - - .DataOutEndpoint = - { - .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - - .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM), - .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), - .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x00 - }, - - .DataInEndpoint = - { - .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, - - .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM), - .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), - .EndpointSize = CDC_TXRX_EPSIZE, - .PollingIntervalMS = 0x00 - }, .MSInterface = { .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - .InterfaceNumber = 2, + .InterfaceNumber = 0, .AlternateSetting = 0, .TotalEndpoints = 2, @@ -323,3 +217,5 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, *DescriptorAddress = Address; return Size; } + +#endif