fw/icE1usb: Adapt the CDC descriptors to new structure from no2usb
Those are actually disabled right now, but since the submodule got updated and the protocol struct/defines changed, this updates them anyway so you can uncommend/enable them without causing a build failure Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Change-Id: I1895702eac9c6c392f24327b12f9ba3651e3249a
This commit is contained in:
parent
348f425936
commit
b9d9363d91
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <no2usb/usb_proto.h>
|
||||
#include <no2usb/usb_cdc_proto.h>
|
||||
#include <no2usb/usb_dfu_proto.h>
|
||||
#include <no2usb/usb.h>
|
||||
|
||||
|
@ -13,6 +14,8 @@
|
|||
#define num_elem(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
|
||||
usb_cdc_union_desc_def(1);
|
||||
|
||||
static const struct {
|
||||
/* Configuration */
|
||||
struct usb_conf_desc conf;
|
||||
|
@ -43,10 +46,9 @@ static const struct {
|
|||
#if 0
|
||||
struct {
|
||||
struct usb_intf_desc intf_ctl;
|
||||
struct usb_cs_intf_hdr_desc cs_intf_hdr;
|
||||
struct usb_cs_intf_acm_desc cs_intf_acm;
|
||||
struct usb_cs_intf_union_desc cs_intf_union;
|
||||
uint8_t cs_intf_union_slave;
|
||||
struct usb_cdc_hdr_desc cdc_hdr;
|
||||
struct usb_cdc_acm_desc cdc_acm;
|
||||
struct usb_cdc_union_desc__1 cdc_union;
|
||||
struct usb_ep_desc ep_ctl;
|
||||
struct usb_intf_desc intf_data;
|
||||
struct usb_ep_desc ep_data_out;
|
||||
|
@ -174,30 +176,30 @@ static const struct {
|
|||
.bInterfaceNumber = 1,
|
||||
.bAlternateSetting = 0,
|
||||
.bNumEndpoints = 1,
|
||||
.bInterfaceClass = 0x02,
|
||||
.bInterfaceSubClass = 0x02,
|
||||
.bInterfaceClass = USB_CLS_CDC_CONTROL,
|
||||
.bInterfaceSubClass = USB_CDC_SCLS_ACM,
|
||||
.bInterfaceProtocol = 0x00,
|
||||
.iInterface = 6,
|
||||
},
|
||||
.cs_intf_hdr = {
|
||||
.bLength = sizeof(struct usb_cs_intf_hdr_desc),
|
||||
.bDescriptorType = USB_DT_CS_INTF,
|
||||
.bDescriptorsubtype = 0x00,
|
||||
.cdc_hdr = {
|
||||
.bLength = sizeof(struct usb_cdc_hdr_desc),
|
||||
.bDescriptorType = USB_CS_DT_INTF,
|
||||
.bDescriptorsubtype = USB_CDC_DST_HEADER,
|
||||
.bcdCDC = 0x0110,
|
||||
},
|
||||
.cs_intf_acm = {
|
||||
.bLength = sizeof(struct usb_cs_intf_acm_desc),
|
||||
.bDescriptorType = USB_DT_CS_INTF,
|
||||
.bDescriptorsubtype = 0x02,
|
||||
.cdc_acm = {
|
||||
.bLength = sizeof(struct usb_cdc_acm_desc),
|
||||
.bDescriptorType = USB_CS_DT_INTF,
|
||||
.bDescriptorsubtype = USB_CDC_DST_ACM,
|
||||
.bmCapabilities = 0x02,
|
||||
},
|
||||
.cs_intf_union = {
|
||||
.bLength = sizeof(struct usb_cs_intf_union_desc) + 1,
|
||||
.bDescriptorType = USB_DT_CS_INTF,
|
||||
.bDescriptorsubtype = 0x06,
|
||||
.cdc_union = {
|
||||
.bLength = sizeof(struct usb_cdc_union_desc) + 1,
|
||||
.bDescriptorType = USB_CS_DT_INTF,
|
||||
.bDescriptorsubtype = USB_CDC_DST_UNION,
|
||||
.bMasterInterface = 1,
|
||||
.bSlaveInterface = { 2 },
|
||||
},
|
||||
.cs_intf_union_slave = 2,
|
||||
.ep_ctl = {
|
||||
.bLength = sizeof(struct usb_ep_desc),
|
||||
.bDescriptorType = USB_DT_EP,
|
||||
|
@ -212,7 +214,7 @@ static const struct {
|
|||
.bInterfaceNumber = 2,
|
||||
.bAlternateSetting = 0,
|
||||
.bNumEndpoints = 2,
|
||||
.bInterfaceClass = 0x0a,
|
||||
.bInterfaceClass = USB_CLS_CDC_DATA,
|
||||
.bInterfaceSubClass = 0x00,
|
||||
.bInterfaceProtocol = 0x00,
|
||||
.iInterface = 7,
|
||||
|
|
Loading…
Reference in New Issue