rename cdc descriptor type

add tusbh_cdc_mounted_isr & tusbh_cdc_unmounted_isr
This commit is contained in:
hathach
2013-07-03 10:53:16 +07:00
parent 539c7cdbe1
commit b3f98bc15a
7 changed files with 58 additions and 45 deletions
@@ -90,7 +90,7 @@ const cdc_configuration_desc_t cdc_config_descriptor =
.cdc_header =
{
.bLength = sizeof(tusb_cdc_func_header_t),
.bLength = sizeof(cdc_desc_func_header_t),
.bDescriptorType = TUSB_DESC_TYPE_INTERFACE_CLASS_SPECIFIC,
.bDescriptorSubType = CDC_FUNC_DESC_HEADER,
.bcdCDC = 0x0120
@@ -98,7 +98,7 @@ const cdc_configuration_desc_t cdc_config_descriptor =
.cdc_acm =
{
.bLength = sizeof(tusb_cdc_func_abstract_control_management_t),
.bLength = sizeof(cdc_desc_func_abstract_control_management_t),
.bDescriptorType = TUSB_DESC_TYPE_INTERFACE_CLASS_SPECIFIC,
.bDescriptorSubType = CDC_FUNC_DESC_ABSTRACT_CONTROL_MANAGEMENT,
.bmCapabilities = { // 0x06
@@ -109,7 +109,7 @@ const cdc_configuration_desc_t cdc_config_descriptor =
.cdc_union =
{
.bLength = sizeof(tusb_cdc_func_union_t), // plus number of
.bLength = sizeof(cdc_desc_func_union_t), // plus number of
.bDescriptorType = TUSB_DESC_TYPE_INTERFACE_CLASS_SPECIFIC,
.bDescriptorSubType = CDC_FUNC_DESC_UNION,
.bControlInterface = 1,
@@ -61,9 +61,9 @@ typedef struct
//CDC Control Interface
tusb_descriptor_interface_t cdc_comm_interface;
tusb_cdc_func_header_t cdc_header;
tusb_cdc_func_abstract_control_management_t cdc_acm;
tusb_cdc_func_union_t cdc_union;
cdc_desc_func_header_t cdc_header;
cdc_desc_func_abstract_control_management_t cdc_acm;
cdc_desc_func_union_t cdc_union;
tusb_descriptor_endpoint_t cdc_endpoint_notification;
//CDC Data Interface
@@ -117,8 +117,8 @@ void test_cdch_open_length_check(void)
{
const uint16_t expected_length =
//------------- Comm Interface -------------//
sizeof(tusb_descriptor_interface_t) + sizeof(tusb_cdc_func_header_t) +
sizeof(tusb_cdc_func_abstract_control_management_t) + sizeof(tusb_cdc_func_union_t) +
sizeof(tusb_descriptor_interface_t) + sizeof(cdc_desc_func_header_t) +
sizeof(cdc_desc_func_abstract_control_management_t) + sizeof(cdc_desc_func_union_t) +
sizeof(tusb_descriptor_endpoint_t) +
//------------- Data Interface -------------//
sizeof(tusb_descriptor_interface_t) + 2*sizeof(tusb_descriptor_endpoint_t);