summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-23 12:32:40 +0700
committerhathach <[email protected]>2018-03-23 12:32:40 +0700
commit5f26c57b286ecdc555856c1e3e486923a43f4d04 (patch)
tree0cb8d52def0cab79f76d6a0911ac4e0f874edc18 /examples
parent2c18805aa9b3b46777e0fcfb8d97efba209f9115 (diff)
shorten descriptor type
Diffstat (limited to 'examples')
-rw-r--r--examples/device/device_virtual_com/src/tusb_descriptors.c18
-rw-r--r--examples/device/device_virtual_com/src/tusb_descriptors.h14
-rw-r--r--examples/device/nrf52840/src/tusb_descriptors.c18
-rw-r--r--examples/device/nrf52840/src/tusb_descriptors.h14
-rw-r--r--examples/obsolete/device/src/tusb_descriptors.c32
-rw-r--r--examples/obsolete/device/src/tusb_descriptors.h28
6 files changed, 62 insertions, 62 deletions
diff --git a/examples/device/device_virtual_com/src/tusb_descriptors.c b/examples/device/device_virtual_com/src/tusb_descriptors.c
index efa9b051c..253bed21d 100644
--- a/examples/device/device_virtual_com/src/tusb_descriptors.c
+++ b/examples/device/device_virtual_com/src/tusb_descriptors.c
@@ -41,9 +41,9 @@
//--------------------------------------------------------------------+
// USB DEVICE DESCRIPTOR
//--------------------------------------------------------------------+
-tusb_descriptor_device_t const desc_device =
+tusb_desc_device_t const desc_device =
{
- .bLength = sizeof(tusb_descriptor_device_t),
+ .bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
@@ -73,7 +73,7 @@ app_descriptor_configuration_t const desc_configuration =
{
.configuration =
{
- .bLength = sizeof(tusb_descriptor_configuration_t),
+ .bLength = sizeof(tusb_desc_configuration_t),
.bDescriptorType = TUSB_DESC_CONFIGURATION,
.wTotalLength = sizeof(app_descriptor_configuration_t),
@@ -88,7 +88,7 @@ app_descriptor_configuration_t const desc_configuration =
// IAD points to CDC Interfaces
.cdc_iad =
{
- .bLength = sizeof(tusb_descriptor_interface_association_t),
+ .bLength = sizeof(tusb_desc_interface_assoc_t),
.bDescriptorType = TUSB_DESC_INTERFACE_ASSOCIATION,
.bFirstInterface = INTERFACE_NO_CDC,
@@ -103,7 +103,7 @@ app_descriptor_configuration_t const desc_configuration =
//------------- CDC Communication Interface -------------//
.cdc_comm_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_CDC,
.bAlternateSetting = 0,
@@ -152,7 +152,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_notification =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_NOTIFICATION_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
@@ -163,7 +163,7 @@ app_descriptor_configuration_t const desc_configuration =
//------------- CDC Data Interface -------------//
.cdc_data_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_CDC+1,
.bAlternateSetting = 0x00,
@@ -176,7 +176,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_out =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_DATA_OUT_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
@@ -186,7 +186,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_in =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_DATA_IN_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
diff --git a/examples/device/device_virtual_com/src/tusb_descriptors.h b/examples/device/device_virtual_com/src/tusb_descriptors.h
index 0c74b5297..ae6872900 100644
--- a/examples/device/device_virtual_com/src/tusb_descriptors.h
+++ b/examples/device/device_virtual_com/src/tusb_descriptors.h
@@ -78,23 +78,23 @@
//--------------------------------------------------------------------+
typedef struct ATTR_PACKED
{
- tusb_descriptor_configuration_t configuration;
+ tusb_desc_configuration_t configuration;
//------------- CDC -------------//
- tusb_descriptor_interface_association_t cdc_iad;
+ tusb_desc_interface_assoc_t cdc_iad;
//CDC Control Interface
- tusb_descriptor_interface_t cdc_comm_interface;
+ tusb_desc_interface_t cdc_comm_interface;
cdc_desc_func_header_t cdc_header;
cdc_desc_func_call_management_t cdc_call;
cdc_desc_func_abstract_control_management_t cdc_acm;
cdc_desc_func_union_t cdc_union;
- tusb_descriptor_endpoint_t cdc_endpoint_notification;
+ tusb_desc_endpoint_t cdc_endpoint_notification;
//CDC Data Interface
- tusb_descriptor_interface_t cdc_data_interface;
- tusb_descriptor_endpoint_t cdc_endpoint_out;
- tusb_descriptor_endpoint_t cdc_endpoint_in;
+ tusb_desc_interface_t cdc_data_interface;
+ tusb_desc_endpoint_t cdc_endpoint_out;
+ tusb_desc_endpoint_t cdc_endpoint_in;
} app_descriptor_configuration_t;
diff --git a/examples/device/nrf52840/src/tusb_descriptors.c b/examples/device/nrf52840/src/tusb_descriptors.c
index efa9b051c..253bed21d 100644
--- a/examples/device/nrf52840/src/tusb_descriptors.c
+++ b/examples/device/nrf52840/src/tusb_descriptors.c
@@ -41,9 +41,9 @@
//--------------------------------------------------------------------+
// USB DEVICE DESCRIPTOR
//--------------------------------------------------------------------+
-tusb_descriptor_device_t const desc_device =
+tusb_desc_device_t const desc_device =
{
- .bLength = sizeof(tusb_descriptor_device_t),
+ .bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
@@ -73,7 +73,7 @@ app_descriptor_configuration_t const desc_configuration =
{
.configuration =
{
- .bLength = sizeof(tusb_descriptor_configuration_t),
+ .bLength = sizeof(tusb_desc_configuration_t),
.bDescriptorType = TUSB_DESC_CONFIGURATION,
.wTotalLength = sizeof(app_descriptor_configuration_t),
@@ -88,7 +88,7 @@ app_descriptor_configuration_t const desc_configuration =
// IAD points to CDC Interfaces
.cdc_iad =
{
- .bLength = sizeof(tusb_descriptor_interface_association_t),
+ .bLength = sizeof(tusb_desc_interface_assoc_t),
.bDescriptorType = TUSB_DESC_INTERFACE_ASSOCIATION,
.bFirstInterface = INTERFACE_NO_CDC,
@@ -103,7 +103,7 @@ app_descriptor_configuration_t const desc_configuration =
//------------- CDC Communication Interface -------------//
.cdc_comm_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_CDC,
.bAlternateSetting = 0,
@@ -152,7 +152,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_notification =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_NOTIFICATION_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
@@ -163,7 +163,7 @@ app_descriptor_configuration_t const desc_configuration =
//------------- CDC Data Interface -------------//
.cdc_data_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_CDC+1,
.bAlternateSetting = 0x00,
@@ -176,7 +176,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_out =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_DATA_OUT_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
@@ -186,7 +186,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_in =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_DATA_IN_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
diff --git a/examples/device/nrf52840/src/tusb_descriptors.h b/examples/device/nrf52840/src/tusb_descriptors.h
index 0c74b5297..ae6872900 100644
--- a/examples/device/nrf52840/src/tusb_descriptors.h
+++ b/examples/device/nrf52840/src/tusb_descriptors.h
@@ -78,23 +78,23 @@
//--------------------------------------------------------------------+
typedef struct ATTR_PACKED
{
- tusb_descriptor_configuration_t configuration;
+ tusb_desc_configuration_t configuration;
//------------- CDC -------------//
- tusb_descriptor_interface_association_t cdc_iad;
+ tusb_desc_interface_assoc_t cdc_iad;
//CDC Control Interface
- tusb_descriptor_interface_t cdc_comm_interface;
+ tusb_desc_interface_t cdc_comm_interface;
cdc_desc_func_header_t cdc_header;
cdc_desc_func_call_management_t cdc_call;
cdc_desc_func_abstract_control_management_t cdc_acm;
cdc_desc_func_union_t cdc_union;
- tusb_descriptor_endpoint_t cdc_endpoint_notification;
+ tusb_desc_endpoint_t cdc_endpoint_notification;
//CDC Data Interface
- tusb_descriptor_interface_t cdc_data_interface;
- tusb_descriptor_endpoint_t cdc_endpoint_out;
- tusb_descriptor_endpoint_t cdc_endpoint_in;
+ tusb_desc_interface_t cdc_data_interface;
+ tusb_desc_endpoint_t cdc_endpoint_out;
+ tusb_desc_endpoint_t cdc_endpoint_in;
} app_descriptor_configuration_t;
diff --git a/examples/obsolete/device/src/tusb_descriptors.c b/examples/obsolete/device/src/tusb_descriptors.c
index 14c6e4883..25e32cd08 100644
--- a/examples/obsolete/device/src/tusb_descriptors.c
+++ b/examples/obsolete/device/src/tusb_descriptors.c
@@ -135,9 +135,9 @@ uint8_t const desc_mouse_report[] = {
//--------------------------------------------------------------------+
// USB DEVICE DESCRIPTOR
//--------------------------------------------------------------------+
-tusb_descriptor_device_t const desc_device =
+tusb_desc_device_t const desc_device =
{
- .bLength = sizeof(tusb_descriptor_device_t),
+ .bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
#if TUSB_CFG_DEVICE_CDC
@@ -172,7 +172,7 @@ app_descriptor_configuration_t const desc_configuration =
{
.configuration =
{
- .bLength = sizeof(tusb_descriptor_configuration_t),
+ .bLength = sizeof(tusb_desc_configuration_t),
.bDescriptorType = TUSB_DESC_CONFIGURATION,
.wTotalLength = sizeof(app_descriptor_configuration_t),
@@ -188,7 +188,7 @@ app_descriptor_configuration_t const desc_configuration =
// IAD points to CDC Interfaces
.cdc_iad =
{
- .bLength = sizeof(tusb_descriptor_interface_association_t),
+ .bLength = sizeof(tusb_desc_interface_assoc_t),
.bDescriptorType = TUSB_DESC_INTERFACE_ASSOCIATION,
.bFirstInterface = INTERFACE_NO_CDC,
@@ -203,7 +203,7 @@ app_descriptor_configuration_t const desc_configuration =
//------------- CDC Communication Interface -------------//
.cdc_comm_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_CDC,
.bAlternateSetting = 0,
@@ -252,7 +252,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_notification =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_NOTIFICATION_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
@@ -263,7 +263,7 @@ app_descriptor_configuration_t const desc_configuration =
//------------- CDC Data Interface -------------//
.cdc_data_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_CDC+1,
.bAlternateSetting = 0x00,
@@ -276,7 +276,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_out =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_DATA_OUT_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
@@ -286,7 +286,7 @@ app_descriptor_configuration_t const desc_configuration =
.cdc_endpoint_in =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = CDC_EDPT_DATA_IN_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
@@ -299,7 +299,7 @@ app_descriptor_configuration_t const desc_configuration =
#if TUSB_CFG_DEVICE_HID_KEYBOARD
.keyboard_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_HID_KEYBOARD,
.bAlternateSetting = 0x00,
@@ -323,7 +323,7 @@ app_descriptor_configuration_t const desc_configuration =
.keyboard_endpoint =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = HID_KEYBOARD_EDPT_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
@@ -336,7 +336,7 @@ app_descriptor_configuration_t const desc_configuration =
#if TUSB_CFG_DEVICE_HID_MOUSE
.mouse_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_HID_MOUSE,
.bAlternateSetting = 0x00,
@@ -360,7 +360,7 @@ app_descriptor_configuration_t const desc_configuration =
.mouse_endpoint =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = HID_MOUSE_EDPT_ADDR, // TODO
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
@@ -373,7 +373,7 @@ app_descriptor_configuration_t const desc_configuration =
#if TUSB_CFG_DEVICE_MSC
.msc_interface =
{
- .bLength = sizeof(tusb_descriptor_interface_t),
+ .bLength = sizeof(tusb_desc_interface_t),
.bDescriptorType = TUSB_DESC_INTERFACE,
.bInterfaceNumber = INTERFACE_NO_MSC,
.bAlternateSetting = 0x00,
@@ -386,7 +386,7 @@ app_descriptor_configuration_t const desc_configuration =
.msc_endpoint_in =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = MSC_EDPT_IN_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
@@ -396,7 +396,7 @@ app_descriptor_configuration_t const desc_configuration =
.msc_endpoint_out =
{
- .bLength = sizeof(tusb_descriptor_endpoint_t),
+ .bLength = sizeof(tusb_desc_endpoint_t),
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = MSC_EDPT_OUT_ADDR,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
diff --git a/examples/obsolete/device/src/tusb_descriptors.h b/examples/obsolete/device/src/tusb_descriptors.h
index 322af0392..8bcec74dd 100644
--- a/examples/obsolete/device/src/tusb_descriptors.h
+++ b/examples/obsolete/device/src/tusb_descriptors.h
@@ -132,45 +132,45 @@
//--------------------------------------------------------------------+
typedef struct ATTR_PACKED
{
- tusb_descriptor_configuration_t configuration;
+ tusb_desc_configuration_t configuration;
//------------- CDC -------------//
#if TUSB_CFG_DEVICE_CDC
- tusb_descriptor_interface_association_t cdc_iad;
+ tusb_desc_interface_assoc_t cdc_iad;
//CDC Control Interface
- tusb_descriptor_interface_t cdc_comm_interface;
+ tusb_desc_interface_t cdc_comm_interface;
cdc_desc_func_header_t cdc_header;
cdc_desc_func_call_management_t cdc_call;
cdc_desc_func_abstract_control_management_t cdc_acm;
cdc_desc_func_union_t cdc_union;
- tusb_descriptor_endpoint_t cdc_endpoint_notification;
+ tusb_desc_endpoint_t cdc_endpoint_notification;
//CDC Data Interface
- tusb_descriptor_interface_t cdc_data_interface;
- tusb_descriptor_endpoint_t cdc_endpoint_out;
- tusb_descriptor_endpoint_t cdc_endpoint_in;
+ tusb_desc_interface_t cdc_data_interface;
+ tusb_desc_endpoint_t cdc_endpoint_out;
+ tusb_desc_endpoint_t cdc_endpoint_in;
#endif
//------------- HID Keyboard -------------//
#if TUSB_CFG_DEVICE_HID_KEYBOARD
- tusb_descriptor_interface_t keyboard_interface;
+ tusb_desc_interface_t keyboard_interface;
tusb_hid_descriptor_hid_t keyboard_hid;
- tusb_descriptor_endpoint_t keyboard_endpoint;
+ tusb_desc_endpoint_t keyboard_endpoint;
#endif
//------------- HID Mouse -------------//
#if TUSB_CFG_DEVICE_HID_MOUSE
- tusb_descriptor_interface_t mouse_interface;
+ tusb_desc_interface_t mouse_interface;
tusb_hid_descriptor_hid_t mouse_hid;
- tusb_descriptor_endpoint_t mouse_endpoint;
+ tusb_desc_endpoint_t mouse_endpoint;
#endif
//------------- Mass Storage -------------//
#if TUSB_CFG_DEVICE_MSC
- tusb_descriptor_interface_t msc_interface;
- tusb_descriptor_endpoint_t msc_endpoint_in;
- tusb_descriptor_endpoint_t msc_endpoint_out;
+ tusb_desc_interface_t msc_interface;
+ tusb_desc_endpoint_t msc_endpoint_in;
+ tusb_desc_endpoint_t msc_endpoint_out;
#endif
} app_descriptor_configuration_t;