Fix USB descriptor bugs (wrong interface, ProtocolsSuported, ...)

Change-Id: I0be2d8b92f176f31250a76e6f5b74a5c12d8cf42
This commit is contained in:
Eric Wild 2019-10-01 15:04:01 +02:00 committed by Harald Welte
parent 33403af9a0
commit 7603390bd0
3 changed files with 7 additions and 6 deletions

View File

@ -39,7 +39,7 @@
// <CONF_USB_D_N_EP_MAX"> Max possible (by "Max Endpoint Number" config)
// <id> usbd_num_ep_sp
#ifndef CONF_USB_D_NUM_EP_SP
#define CONF_USB_D_NUM_EP_SP CONF_USB_N_6
#define CONF_USB_D_NUM_EP_SP CONF_USB_N_7
#endif
// </h>

View File

@ -204,7 +204,7 @@
// <o> bInterfaceNumber <0x00-0xFF>
// <id> usb_cdcd_acm_comm_bifcnum
#ifndef CONF_USB_CDCD_ACM_COMM_BIFCNUM
#define CONF_USB_CDCD_ACM_COMM_BIFCNUM 0x0
#define CONF_USB_CDCD_ACM_COMM_BIFCNUM 0x1
#endif
// <o> bAlternateSetting <0x00-0xFF>
// <id> usb_cdcd_acm_comm_baltset
@ -253,7 +253,7 @@
// <o> bInterfaceNumber <0x00-0xFF>
// <id> usb_cdcd_acm_data_bifcnum
#ifndef CONF_USB_CDCD_ACM_DATA_BIFCNUM
#define CONF_USB_CDCD_ACM_DATA_BIFCNUM 0x1
#define CONF_USB_CDCD_ACM_DATA_BIFCNUM 0x2
#endif
// <o> bAlternateSetting <0x00-0xFF>
// <id> usb_cdcd_acm_data_baltset

View File

@ -162,7 +162,7 @@ static const struct usb_desc_collection usb_fs_descs = {
.iface = {
.bLength = sizeof(struct usb_iface_desc),
.bDescriptorType = USB_DT_INTERFACE,
.bInterfaceNumber = 2,
.bInterfaceNumber = 0,
.bAlternateSetting = 0,
.bNumEndpoints = 3,
.bInterfaceClass = 11,
@ -175,7 +175,8 @@ static const struct usb_desc_collection usb_fs_descs = {
.bDescriptorType = 33,
.bcdCCID = LE16(0x0110),
.bMaxSlotIndex = 7,
.dwProtocols = 0x07, /* 5/3/1.8V */
.bVoltageSupport = 0x07, /* 5/3/1.8V */
.dwProtocols = 0x03,
.dwDefaultClock = LE32(2500),
.dwMaximumClock = LE32(20000),
.bNumClockSupported = 4,
@ -185,7 +186,7 @@ static const struct usb_desc_collection usb_fs_descs = {
.dwMaxIFSD = LE32(0),
.dwSynchProtocols = LE32(0),
.dwMechanical = LE32(0),
.dwFeatures = LE32(0x10),
.dwFeatures = LE32(0x10 | 0x00010000),
.dwMaxCCIDMessageLength = 272,
.bClassGetResponse = 0xff,
.bClassEnvelope = 0xff,