Skip to content

Commit 85a08da

Browse files
Emil Obalskinashif
authored andcommitted
usb: Rename defines to match present naming convention
This commit renames two defines: CS_INTERFACE -> USB_CS_INTERFACE_DESC CS_ENDPOINT -> USB_CS_ENDPOINT_DESC in order to match current naming convention when it comes to descriptors fields. All relevant files are updated to match renamed macros. Signed-off-by: Emil Obalski <[email protected]>
1 parent c1f5e11 commit 85a08da

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

include/usb/usb_common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
#define USB_DEVICE_CAPABILITY_DESC 0x10
7272
#define USB_HID_DESC 0x21
7373
#define USB_HID_REPORT_DESC 0x22
74-
#define CS_INTERFACE 0x24
75-
#define CS_ENDPOINT 0x25
74+
#define USB_CS_INTERFACE_DESC 0x24
75+
#define USB_CS_ENDPOINT_DESC 0x25
7676
#define USB_DFU_FUNCTIONAL_DESC 0x21
7777
#define USB_ASSOCIATION_DESC 0x0B
7878
#define USB_BINARY_OBJECT_STORE_DESC 0x0F

subsys/usb/class/cdc_acm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ struct usb_cdc_acm_config {
118118
#define INITIALIZER_IF_HDR \
119119
{ \
120120
.bFunctionLength = sizeof(struct cdc_header_descriptor),\
121-
.bDescriptorType = CS_INTERFACE, \
121+
.bDescriptorType = USB_CS_INTERFACE_DESC, \
122122
.bDescriptorSubtype = HEADER_FUNC_DESC, \
123123
.bcdCDC = sys_cpu_to_le16(USB_1_1), \
124124
}
125125

126126
#define INITIALIZER_IF_CM \
127127
{ \
128128
.bFunctionLength = sizeof(struct cdc_cm_descriptor), \
129-
.bDescriptorType = CS_INTERFACE, \
129+
.bDescriptorType = USB_CS_INTERFACE_DESC, \
130130
.bDescriptorSubtype = CALL_MANAGEMENT_FUNC_DESC, \
131131
.bmCapabilities = 0x02, \
132132
.bDataInterface = 1, \
@@ -141,15 +141,15 @@ struct usb_cdc_acm_config {
141141
#define INITIALIZER_IF_ACM \
142142
{ \
143143
.bFunctionLength = sizeof(struct cdc_acm_descriptor), \
144-
.bDescriptorType = CS_INTERFACE, \
144+
.bDescriptorType = USB_CS_INTERFACE_DESC, \
145145
.bDescriptorSubtype = ACM_FUNC_DESC, \
146146
.bmCapabilities = 0x02, \
147147
}
148148

149149
#define INITIALIZER_IF_UNION \
150150
{ \
151151
.bFunctionLength = sizeof(struct cdc_union_descriptor), \
152-
.bDescriptorType = CS_INTERFACE, \
152+
.bDescriptorType = USB_CS_INTERFACE_DESC, \
153153
.bDescriptorSubtype = UNION_FUNC_DESC, \
154154
.bControlInterface = 0, \
155155
.bSubordinateInterface0 = 1, \

subsys/usb/class/netusb/function_ecm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,22 @@ USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_cdc_ecm_config cdc_ecm_cfg = {
7878
/* Header Functional Descriptor */
7979
.if0_header = {
8080
.bFunctionLength = sizeof(struct cdc_header_descriptor),
81-
.bDescriptorType = CS_INTERFACE,
81+
.bDescriptorType = USB_CS_INTERFACE_DESC,
8282
.bDescriptorSubtype = HEADER_FUNC_DESC,
8383
.bcdCDC = sys_cpu_to_le16(USB_1_1),
8484
},
8585
/* Union Functional Descriptor */
8686
.if0_union = {
8787
.bFunctionLength = sizeof(struct cdc_union_descriptor),
88-
.bDescriptorType = CS_INTERFACE,
88+
.bDescriptorType = USB_CS_INTERFACE_DESC,
8989
.bDescriptorSubtype = UNION_FUNC_DESC,
9090
.bControlInterface = 0,
9191
.bSubordinateInterface0 = 1,
9292
},
9393
/* Ethernet Networking Functional descriptor */
9494
.if0_netfun_ecm = {
9595
.bFunctionLength = sizeof(struct cdc_ecm_descriptor),
96-
.bDescriptorType = CS_INTERFACE,
96+
.bDescriptorType = USB_CS_INTERFACE_DESC,
9797
.bDescriptorSubtype = ETHERNET_FUNC_DESC,
9898
.iMACAddress = 4,
9999
.bmEthernetStatistics = sys_cpu_to_le32(0), /* None */

subsys/usb/class/netusb/function_rndis.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_rndis_config rndis_cfg = {
8989
/* Header Functional Descriptor */
9090
.if0_header = {
9191
.bFunctionLength = sizeof(struct cdc_header_descriptor),
92-
.bDescriptorType = CS_INTERFACE,
92+
.bDescriptorType = USB_CS_INTERFACE_DESC,
9393
.bDescriptorSubtype = HEADER_FUNC_DESC,
9494
.bcdCDC = sys_cpu_to_le16(USB_1_1),
9595
},
9696
/* Call Management Functional Descriptor */
9797
.if0_cm = {
9898
.bFunctionLength = sizeof(struct cdc_cm_descriptor),
99-
.bDescriptorType = CS_INTERFACE,
99+
.bDescriptorType = USB_CS_INTERFACE_DESC,
100100
.bDescriptorSubtype = CALL_MANAGEMENT_FUNC_DESC,
101101
.bmCapabilities = 0x00,
102102
.bDataInterface = 1,
103103
},
104104
/* ACM Functional Descriptor */
105105
.if0_acm = {
106106
.bFunctionLength = sizeof(struct cdc_acm_descriptor),
107-
.bDescriptorType = CS_INTERFACE,
107+
.bDescriptorType = USB_CS_INTERFACE_DESC,
108108
.bDescriptorSubtype = ACM_FUNC_DESC,
109109
/* Device supports the request combination of:
110110
* Set_Line_Coding,
@@ -117,7 +117,7 @@ USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_rndis_config rndis_cfg = {
117117
/* Union Functional Descriptor */
118118
.if0_union = {
119119
.bFunctionLength = sizeof(struct cdc_union_descriptor),
120-
.bDescriptorType = CS_INTERFACE,
120+
.bDescriptorType = USB_CS_INTERFACE_DESC,
121121
.bDescriptorSubtype = UNION_FUNC_DESC,
122122
.bControlInterface = 0,
123123
.bSubordinateInterface0 = 1,

0 commit comments

Comments
 (0)