Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USB_Descriptor_Configuration_t ConfigurationDescriptor __SECTION_RODATA =
- {
- .Config =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t)-1,
- .TotalInterfaces = 2,
- .ConfigurationNumber = 1,
- .ConfigurationStrIndex = NO_DESCRIPTOR,
- .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- .MaxPowerConsumption = USB_CONFIG_POWER_MA(CONF_CORE_CURRENT_NOM / 8) // in 8mA units
- },
- .CDC_CCI_Interface =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber = 0,
- .AlternateSetting = 0,
- .TotalEndpoints = 1,
- .Class = CDC_CSCP_CDCClass,
- .SubClass = CDC_CSCP_ACMSubclass,
- .Protocol = CDC_CSCP_ATCommandProtocol,
- .InterfaceStrIndex = NO_DESCRIPTOR
- },
- .CDC_Functional_Header =
- {
- .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface},
- .Subtype = CDC_DSUBTYPE_CSInterface_Header,
- .CDCSpecification = VERSION_BCD(01.10),
- },
- .CDC_Functional_ACM =
- {
- .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface},
- .Subtype = CDC_DSUBTYPE_CSInterface_ACM,
- .Capabilities = 0x04, // see PSTN120.pdf
- },
- .CDC_Functional_Union =
- {
- .Header = {.Size = sizeof(USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface},
- .Subtype = CDC_DSUBTYPE_CSInterface_Union,
- .MasterInterfaceNumber = 0,
- .SlaveInterfaceNumber = 1,
- },
- .CDC_NotificationEndpoint =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
- .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
- .EndpointSize = CDC_NOTIFICATION_EPSIZE,
- .PollingIntervalMS = 0xFF
- },
- .CDC_DCI_Interface =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- .InterfaceNumber = 1,
- .AlternateSetting = 0,
- .TotalEndpoints = 2,
- .Class = CDC_CSCP_CDCDataClass,
- .SubClass = CDC_CSCP_NoDataSubclass,
- .Protocol = CDC_CSCP_NoDataProtocol,
- .InterfaceStrIndex = NO_DESCRIPTOR
- },
- .CDC_DataOutEndpoint =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
- .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
- .EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x02
- },
- .CDC_DataInEndpoint =
- {
- .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
- .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
- .EndpointSize = CDC_TXRX_EPSIZE,
- .PollingIntervalMS = 0x02
- },
- // Required by IP3511
- .CDC_Termination = 0x00
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement