0x00, /* bAlternateSetting. */ 0x01, /* bNumEndpoints. */ 0x02, /* bInterfaceClass (Communications Interface Class, CDC section 4.2). */ 0x02, /* bInterfaceSubClass (Abstract Control Model, CDC section 4.3). */ 0x01, /* bInterfaceProtocol (AT commands, CDC section 4.4). */ 0), /* iInterface. */ /* Header Functional Descriptor (CDC section 5.2.3).*/ USB_DESC_BYTE (5), /* bLength. */ USB_DESC_BYTE (0x24), /* bDescriptorType (CS_INTERFACE). */ USB_DESC_BYTE (0x00), /* bDescriptorSubtype (Header Functional Descriptor. */ USB_DESC_BCD (0x0110), /* bcdCDC. */ /* Call Management Functional Descriptor. */ USB_DESC_BYTE (5), /* bFunctionLength. */ USB_DESC_BYTE (0x24), /* bDescriptorType (CS_INTERFACE). */ USB_DESC_BYTE (0x01), /* bDescriptorSubtype (Call Management Functional Descriptor). */ USB_DESC_BYTE (0x00), /* bmCapabilities (D0+D1). */ USB_DESC_BYTE (0x01), /* bDataInterface. */ /* ACM Functional Descriptor.*/ USB_DESC_BYTE (4), /* bFunctionLength. */ USB_DESC_BYTE (0x24), /* bDescriptorType (CS_INTERFACE). */ USB_DESC_BYTE (0x02), /* bDescriptorSubtype (Abstract Control Management Descriptor). */ USB_DESC_BYTE (0x02), /* bmCapabilities. */ /* Union Functional Descriptor.*/ USB_DESC_BYTE (5), /* bFunctionLength. */
0xC0, /* bmAttributes (self powered, set to 0x80 if not) */ 50), /* bMaxPower (100mA) */ /* Interface Descriptor (9 bytes) */ USB_DESC_INTERFACE(0, /* bInterfaceNumber */ 0, /* bAlternateSetting */ 1, /* bNumEndpoints */ 0x03, /* bInterfaceClass: HID */ 0x00, /* bInterfaceSubClass: None */ 0x00, /* bInterfaceProtocol: None */ 0), /* iInterface */ /* HID descriptor (9 bytes) */ USB_DESC_BYTE(9), /* bLength */ USB_DESC_BYTE(0x21), /* bDescriptorType (HID class) */ USB_DESC_BCD(0x0111), /* bcdHID: HID version 1.11 */ USB_DESC_BYTE(0), /* bCountryCode */ USB_DESC_BYTE(1), /* bNumDescriptors */ USB_DESC_BYTE(0x22), /* bDescriptorType (report desc) */ USB_DESC_WORD(sizeof(hid_report_descriptor_data)), /* wDescriptorLength */ /* HID debug Endpoint (IN) Descriptor (7 bytes) */ USB_DESC_ENDPOINT(DEBUG_TX_ENDPOINT | 0x80, /* bEndpointAddress */ 0x03, /* bmAttributes (Interrupt) */ DEBUG_TX_SIZE, /* wMaxPacketSize */ 1) /* bInterval */ }; /* Configuration Descriptor wrapper */ static const USBDescriptor hid_configuration_descriptor = { sizeof hid_configuration_descriptor_data,