Explorar el Código

projects/*/fw: Fixup USB descriptors after no2usb upgrade

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut hace 3 años
padre
commit
26dd814a25
Se han modificado 2 ficheros con 11 adiciones y 11 borrados
  1. 8 8
      projects/riscv_usb/fw/usb_desc_app.c
  2. 3 3
      projects/usb_audio/fw/usb_desc_app.c

+ 8 - 8
projects/riscv_usb/fw/usb_desc_app.c

@@ -67,27 +67,27 @@ static const struct {
 			.bInterfaceNumber	= 0,
 			.bAlternateSetting	= 0,
 			.bNumEndpoints		= 1,
-			.bInterfaceClass	= 0x02,
-			.bInterfaceSubClass	= 0x02,
+			.bInterfaceClass	= USB_CLS_CDC_CONTROL,
+			.bInterfaceSubClass	= USB_CDC_SCLS_ACM,
 			.bInterfaceProtocol	= 0x00,
 			.iInterface		= 5,
 		},
 		.cdc_hdr = {
 			.bLength		= sizeof(struct usb_cdc_hdr_desc),
 			.bDescriptorType	= USB_CS_DT_INTF,
-			.bDescriptorsubtype	= 0x00,
+			.bDescriptorsubtype	= USB_CDC_DST_HEADER,
 			.bcdCDC			= 0x0110,
 		},
 		.cdc_acm = {
 			.bLength		= sizeof(struct usb_cdc_acm_desc),
 			.bDescriptorType	= USB_CS_DT_INTF,
-			.bDescriptorsubtype	= 0x02,
+			.bDescriptorsubtype	= USB_CDC_DST_ACM,
 			.bmCapabilities		= 0x02,
 		},
 		.cdc_union = {
 			.bLength		= sizeof(struct usb_cdc_union_desc) + 1,
 			.bDescriptorType	= USB_CS_DT_INTF,
-			.bDescriptorsubtype	= 0x06,
+			.bDescriptorsubtype	= USB_CDC_DST_UNION,
 			.bMasterInterface	= 0,
 		},
 		.cdc_union_slave = 1,
@@ -105,7 +105,7 @@ static const struct {
 			.bInterfaceNumber	= 1,
 			.bAlternateSetting	= 0,
 			.bNumEndpoints		= 2,
-			.bInterfaceClass	= 0x0a,
+			.bInterfaceClass	= USB_CLS_CDC_DATA,
 			.bInterfaceSubClass	= 0x00,
 			.bInterfaceProtocol	= 0x00,
 			.iInterface		= 6,
@@ -134,7 +134,7 @@ static const struct {
 			.bInterfaceNumber	= 2,
 			.bAlternateSetting	= 0,
 			.bNumEndpoints		= 0,
-			.bInterfaceClass	= 0xfe,
+			.bInterfaceClass	= USB_CLS_APP_SPECIFIC,
 			.bInterfaceSubClass	= 0x01,
 			.bInterfaceProtocol	= 0x01,
 			.iInterface		= 7,
@@ -143,7 +143,7 @@ static const struct {
 			.bLength		= sizeof(struct usb_dfu_func_desc),
 			.bDescriptorType	= USB_DFU_DT_FUNC,
 			.bmAttributes		= 0x0d,
-			.wDetachTimeOut		= 1000,
+			.wDetachTimeOut		= 0,
 			.wTransferSize		= 4096,
 			.bcdDFUVersion		= 0x0101,
 		},

+ 3 - 3
projects/usb_audio/fw/usb_desc_app.c

@@ -91,7 +91,7 @@ static const struct {
 			.bInterfaceNumber	= 0,
 			.bAlternateSetting	= 0,
 			.bNumEndpoints		= 0,
-			.bInterfaceClass	= 0xfe,
+			.bInterfaceClass	= USB_CLS_APP_SPECIFIC,
 			.bInterfaceSubClass	= 0x01,
 			.bInterfaceProtocol	= 0x01,
 			.iInterface		= 5,
@@ -100,7 +100,7 @@ static const struct {
 			.bLength		= sizeof(struct usb_dfu_func_desc),
 			.bDescriptorType	= USB_DFU_DT_FUNC,
 			.bmAttributes		= 0x0d,
-			.wDetachTimeOut		= 1000,
+			.wDetachTimeOut		= 0,
 			.wTransferSize		= 4096,
 			.bcdDFUVersion		= 0x0101,
 		},
@@ -150,7 +150,7 @@ static const struct {
 				U16_TO_U8_LE(0x0003),	// Mute + Volume
 				U16_TO_U8_LE(0x0003),	// Mute + Volume
 			},
-			.iTerminal		= 0,
+			.iFeature		= 0,
 		},
 		.output = {
 			.bLength		= sizeof(struct usb_ac_ac_output_desc),