|
|
@@ -77,7 +77,7 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
.bDescriptorType = TUSB_DESC_CONFIGURATION,
|
|
|
|
|
|
.wTotalLength = sizeof(app_descriptor_configuration_t),
|
|
|
- .bNumInterfaces = TOTAL_INTEFACES,
|
|
|
+ .bNumInterfaces = ITF_TOTAL,
|
|
|
|
|
|
.bConfigurationValue = 1,
|
|
|
.iConfiguration = 0x00,
|
|
|
@@ -93,7 +93,7 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
.bLength = sizeof(tusb_desc_interface_assoc_t),
|
|
|
.bDescriptorType = TUSB_DESC_INTERFACE_ASSOCIATION,
|
|
|
|
|
|
- .bFirstInterface = INTERFACE_NO_CDC,
|
|
|
+ .bFirstInterface = ITF_NUM_CDC,
|
|
|
.bInterfaceCount = 2,
|
|
|
|
|
|
.bFunctionClass = TUSB_CLASS_CDC,
|
|
|
@@ -107,7 +107,7 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
{
|
|
|
.bLength = sizeof(tusb_desc_interface_t),
|
|
|
.bDescriptorType = TUSB_DESC_INTERFACE,
|
|
|
- .bInterfaceNumber = INTERFACE_NO_CDC,
|
|
|
+ .bInterfaceNumber = ITF_NUM_CDC,
|
|
|
.bAlternateSetting = 0,
|
|
|
.bNumEndpoints = 1,
|
|
|
.bInterfaceClass = TUSB_CLASS_CDC,
|
|
|
@@ -130,7 +130,7 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
.bDescriptorType = TUSB_DESC_CLASS_SPECIFIC,
|
|
|
.bDescriptorSubType = CDC_FUNC_DESC_CALL_MANAGEMENT,
|
|
|
.bmCapabilities = { 0 },
|
|
|
- .bDataInterface = INTERFACE_NO_CDC+1,
|
|
|
+ .bDataInterface = ITF_NUM_CDC+1,
|
|
|
},
|
|
|
|
|
|
.acm =
|
|
|
@@ -148,17 +148,17 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
.bLength = sizeof(cdc_desc_func_union_t), // plus number of
|
|
|
.bDescriptorType = TUSB_DESC_CLASS_SPECIFIC,
|
|
|
.bDescriptorSubType = CDC_FUNC_DESC_UNION,
|
|
|
- .bControlInterface = INTERFACE_NO_CDC,
|
|
|
- .bSubordinateInterface = INTERFACE_NO_CDC+1,
|
|
|
+ .bControlInterface = ITF_NUM_CDC,
|
|
|
+ .bSubordinateInterface = ITF_NUM_CDC+1,
|
|
|
},
|
|
|
|
|
|
.ep_notif =
|
|
|
{
|
|
|
.bLength = sizeof(tusb_desc_endpoint_t),
|
|
|
.bDescriptorType = TUSB_DESC_ENDPOINT,
|
|
|
- .bEndpointAddress = CDC_EDPT_NOTIFICATION_ADDR,
|
|
|
+ .bEndpointAddress = CDC_EDPT_NOTIF,
|
|
|
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
|
|
|
- .wMaxPacketSize = { .size = 0x08 },
|
|
|
+ .wMaxPacketSize = { .size = CDC_EDPT_NOTIF_SIZE },
|
|
|
.bInterval = 0x10
|
|
|
},
|
|
|
|
|
|
@@ -167,7 +167,7 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
{
|
|
|
.bLength = sizeof(tusb_desc_interface_t),
|
|
|
.bDescriptorType = TUSB_DESC_INTERFACE,
|
|
|
- .bInterfaceNumber = INTERFACE_NO_CDC+1,
|
|
|
+ .bInterfaceNumber = ITF_NUM_CDC+1,
|
|
|
.bAlternateSetting = 0x00,
|
|
|
.bNumEndpoints = 2,
|
|
|
.bInterfaceClass = TUSB_CLASS_CDC_DATA,
|
|
|
@@ -180,9 +180,9 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
{
|
|
|
.bLength = sizeof(tusb_desc_endpoint_t),
|
|
|
.bDescriptorType = TUSB_DESC_ENDPOINT,
|
|
|
- .bEndpointAddress = CDC_EDPT_DATA_OUT_ADDR,
|
|
|
+ .bEndpointAddress = CDC_EDPT_OUT,
|
|
|
.bmAttributes = { .xfer = TUSB_XFER_BULK },
|
|
|
- .wMaxPacketSize = { .size = CDC_EDPT_DATA_PACKETSIZE },
|
|
|
+ .wMaxPacketSize = { .size = CDC_EDPT_SIZE },
|
|
|
.bInterval = 0
|
|
|
},
|
|
|
|
|
|
@@ -190,11 +190,47 @@ app_descriptor_configuration_t const desc_configuration =
|
|
|
{
|
|
|
.bLength = sizeof(tusb_desc_endpoint_t),
|
|
|
.bDescriptorType = TUSB_DESC_ENDPOINT,
|
|
|
- .bEndpointAddress = CDC_EDPT_DATA_IN_ADDR,
|
|
|
+ .bEndpointAddress = CDC_EDPT_IN,
|
|
|
.bmAttributes = { .xfer = TUSB_XFER_BULK },
|
|
|
- .wMaxPacketSize = { .size = CDC_EDPT_DATA_PACKETSIZE },
|
|
|
+ .wMaxPacketSize = { .size = CDC_EDPT_SIZE },
|
|
|
.bInterval = 0
|
|
|
},
|
|
|
+ },
|
|
|
+
|
|
|
+ .msc =
|
|
|
+ {
|
|
|
+ .interface =
|
|
|
+ {
|
|
|
+ .bLength = sizeof(tusb_desc_interface_t),
|
|
|
+ .bDescriptorType = TUSB_DESC_INTERFACE,
|
|
|
+ .bInterfaceNumber = ITF_NUM_MSC,
|
|
|
+ .bAlternateSetting = 0x00,
|
|
|
+ .bNumEndpoints = 2,
|
|
|
+ .bInterfaceClass = TUSB_CLASS_MSC,
|
|
|
+ .bInterfaceSubClass = MSC_SUBCLASS_SCSI,
|
|
|
+ .bInterfaceProtocol = MSC_PROTOCOL_BOT,
|
|
|
+ .iInterface = 0x07
|
|
|
+ },
|
|
|
+
|
|
|
+ .ep_out =
|
|
|
+ {
|
|
|
+ .bLength = sizeof(tusb_desc_endpoint_t),
|
|
|
+ .bDescriptorType = TUSB_DESC_ENDPOINT,
|
|
|
+ .bEndpointAddress = MSC_EDPT_OUT,
|
|
|
+ .bmAttributes = { .xfer = TUSB_XFER_BULK },
|
|
|
+ .wMaxPacketSize = { .size = MSC_EDPT_SIZE},
|
|
|
+ .bInterval = 1
|
|
|
+ },
|
|
|
+
|
|
|
+ .ep_in =
|
|
|
+ {
|
|
|
+ .bLength = sizeof(tusb_desc_endpoint_t),
|
|
|
+ .bDescriptorType = TUSB_DESC_ENDPOINT,
|
|
|
+ .bEndpointAddress = MSC_EDPT_IN,
|
|
|
+ .bmAttributes = { .xfer = TUSB_XFER_BULK },
|
|
|
+ .wMaxPacketSize = { .size = MSC_EDPT_SIZE},
|
|
|
+ .bInterval = 1
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|