Skip to content

Commit 13f7657

Browse files
authored
Merge pull request #40 from r2axz/r2axz-remove-clang-format
Remove Clang Format File
2 parents 256cfb4 + 84eb8d9 commit 13f7657

File tree

2 files changed

+13
-134
lines changed

2 files changed

+13
-134
lines changed

.clang-format

Lines changed: 0 additions & 121 deletions
This file was deleted.

usb_descriptors.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const usb_device_descriptor_t usb_device_descriptor = {
8686
.bDeviceClass = usb_device_class_misc,
8787
.bDeviceSubClass = usb_device_subclass_iad,
8888
.bDeviceProtocol = usb_device_protocol_iad,
89-
.bMaxPacketSize = USB_CONTROL_ENDPOINT_SIZE,
89+
.bMaxPacketSize = usb_endpoints[usb_endpoint_address_control].rx_size,
9090
.idVendor = USB_ID_VENDOR,
9191
.idProduct = USB_ID_PRODUCT,
9292
.bcdDevice = USB_BCD_VERSION(1, 0, 0),
@@ -159,7 +159,7 @@ const usb_device_configuration_descriptor_t usb_configuration_descriptor = {
159159
.bDescriptorType = usb_descriptor_type_endpoint,
160160
.bEndpointAddress = usb_endpoint_direction_in | usb_endpoint_address_cdc_0_interrupt,
161161
.bmAttributes = usb_endpoint_type_interrupt,
162-
.wMaxPacketSize = USB_CDC_INTERRUPT_ENDPOINT_SIZE,
162+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_0_interrupt].tx_size,
163163
.bInterval = USB_CDC_INTERRUPT_ENDPOINT_POLLING_INTERVAL,
164164
},
165165
.data_0 = {
@@ -178,15 +178,15 @@ const usb_device_configuration_descriptor_t usb_configuration_descriptor = {
178178
.bDescriptorType = usb_descriptor_type_endpoint,
179179
.bEndpointAddress = usb_endpoint_direction_out | usb_endpoint_address_cdc_0_data,
180180
.bmAttributes = usb_endpoint_type_bulk,
181-
.wMaxPacketSize = USB_CDC_DATA_ENDPOINT_SIZE_SMALL,
181+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_0_data].rx_size,
182182
.bInterval = 0,
183183
},
184184
.data_eptx_0 = {
185-
.bLength = sizeof(usb_configuration_descriptor.data_eprx_0),
185+
.bLength = sizeof(usb_configuration_descriptor.data_eptx_0),
186186
.bDescriptorType = usb_descriptor_type_endpoint,
187187
.bEndpointAddress = usb_endpoint_direction_in | usb_endpoint_address_cdc_0_data,
188188
.bmAttributes = usb_endpoint_type_bulk,
189-
.wMaxPacketSize = USB_CDC_DATA_ENDPOINT_SIZE_SMALL,
189+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_0_data].tx_size,
190190
.bInterval = 0,
191191
},
192192
.comm_iad_1 = {
@@ -241,7 +241,7 @@ const usb_device_configuration_descriptor_t usb_configuration_descriptor = {
241241
.bDescriptorType = usb_descriptor_type_endpoint,
242242
.bEndpointAddress = usb_endpoint_direction_in | usb_endpoint_address_cdc_1_interrupt,
243243
.bmAttributes = usb_endpoint_type_interrupt,
244-
.wMaxPacketSize = USB_CDC_INTERRUPT_ENDPOINT_SIZE,
244+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_1_interrupt].tx_size,
245245
.bInterval = USB_CDC_INTERRUPT_ENDPOINT_POLLING_INTERVAL,
246246
},
247247
.data_1 = {
@@ -260,15 +260,15 @@ const usb_device_configuration_descriptor_t usb_configuration_descriptor = {
260260
.bDescriptorType = usb_descriptor_type_endpoint,
261261
.bEndpointAddress = usb_endpoint_direction_out | usb_endpoint_address_cdc_1_data,
262262
.bmAttributes = usb_endpoint_type_bulk,
263-
.wMaxPacketSize = USB_CDC_DATA_ENDPOINT_SIZE_LARGE,
263+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_1_data].rx_size,
264264
.bInterval = 0,
265265
},
266266
.data_eptx_1 = {
267-
.bLength = sizeof(usb_configuration_descriptor.data_eprx_1),
267+
.bLength = sizeof(usb_configuration_descriptor.data_eptx_1),
268268
.bDescriptorType = usb_descriptor_type_endpoint,
269269
.bEndpointAddress = usb_endpoint_direction_in | usb_endpoint_address_cdc_1_data,
270270
.bmAttributes = usb_endpoint_type_bulk,
271-
.wMaxPacketSize = USB_CDC_DATA_ENDPOINT_SIZE_LARGE,
271+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_1_data].tx_size,
272272
.bInterval = 0,
273273
},
274274
.comm_iad_2 = {
@@ -323,7 +323,7 @@ const usb_device_configuration_descriptor_t usb_configuration_descriptor = {
323323
.bDescriptorType = usb_descriptor_type_endpoint,
324324
.bEndpointAddress = usb_endpoint_direction_in | usb_endpoint_address_cdc_2_interrupt,
325325
.bmAttributes = usb_endpoint_type_interrupt,
326-
.wMaxPacketSize = USB_CDC_INTERRUPT_ENDPOINT_SIZE,
326+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_0_interrupt].tx_size,
327327
.bInterval = USB_CDC_INTERRUPT_ENDPOINT_POLLING_INTERVAL,
328328
},
329329
.data_2 = {
@@ -342,15 +342,15 @@ const usb_device_configuration_descriptor_t usb_configuration_descriptor = {
342342
.bDescriptorType = usb_descriptor_type_endpoint,
343343
.bEndpointAddress = usb_endpoint_direction_out | usb_endpoint_address_cdc_2_data,
344344
.bmAttributes = usb_endpoint_type_bulk,
345-
.wMaxPacketSize = USB_CDC_DATA_ENDPOINT_SIZE_LARGE,
345+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_2_data].rx_size,
346346
.bInterval = 0,
347347
},
348348
.data_eptx_2 = {
349-
.bLength = sizeof(usb_configuration_descriptor.data_eprx_2),
349+
.bLength = sizeof(usb_configuration_descriptor.data_eptx_2),
350350
.bDescriptorType = usb_descriptor_type_endpoint,
351351
.bEndpointAddress = usb_endpoint_direction_in | usb_endpoint_address_cdc_2_data,
352352
.bmAttributes = usb_endpoint_type_bulk,
353-
.wMaxPacketSize = USB_CDC_DATA_ENDPOINT_SIZE_LARGE,
353+
.wMaxPacketSize = usb_endpoints[usb_endpoint_address_cdc_2_data].tx_size,
354354
.bInterval = 0,
355355
},
356356

0 commit comments

Comments
 (0)