include/usb_descriptor.h: Format with clang-format
BRANCH=none
TEST=none
@@ -101,8 +101,10 @@ struct usb_platform_descriptor {
/* Platform Capability UUIDs */
#define USB_PLAT_CAP_WEBUSB /*{3408b638-09a9-47a0-8bfd-a0768815b665}*/ \
- {0x38, 0xB6, 0x08, 0x34, 0xA9, 0x09, 0xA0, 0x47, \
- 0x8B, 0xFD, 0xA0, 0x76, 0x88, 0x15, 0xB6, 0x65}
+ { \
+ 0x38, 0xB6, 0x08, 0x34, 0xA9, 0x09, 0xA0, 0x47, 0x8B, 0xFD, \
+ 0xA0, 0x76, 0x88, 0x15, 0xB6, 0x65 \
+ }
/* Qualifier Descriptor */
struct usb_qualifier_descriptor {
@@ -269,15 +271,14 @@ struct usb_endpoint_descriptor {
uint8_t _type; \
uint8_t _scheme; \
char _data[sizeof(str)]; \
- }) { \
+ }) \
+ { \
/* Total size of the descriptor is : \
* size of the UTF-8 text plus the len/type fields \
* minus the string 0-termination \
*/ \
- sizeof(str) + 3 - 1, \
- USB_DT_WEBUSB_URL, \
- USB_URL_SCHEME_##scheme, \
- str \
+ sizeof(str) + 3 - 1, USB_DT_WEBUSB_URL, \
+ USB_URL_SCHEME_##scheme, str \
}
/* Setup Packet */
@@ -331,14 +332,13 @@ struct usb_ms_ext_compat_id_desc {
uint8_t _len; \
uint8_t _type; \
wchar_t _data[sizeof(str)]; \
- }) { \
+ }) \
+ { \
/* Total size of the descriptor is : \
* size of the UTF-16 text plus the len/type fields \
* minus the string 0-termination \
*/ \
- sizeof(WIDESTR(str)) + 2 - 2, \
- USB_DT_STRING, \
- WIDESTR(str) \
+ sizeof(WIDESTR(str)) + 2 - 2, USB_DT_STRING, WIDESTR(str) \
}
/*
@@ -373,16 +373,14 @@ struct usb_string_desc {
#define USB_WR_STRING_DESC(str) \
(&(struct usb_string_desc){ \
/* As above, two bytes metadata, no null terminator. */ \
- sizeof(WIDESTR(str)) + 2 - 2, \
- USB_DT_STRING, \
- WIDESTR(str) \
-})
+ sizeof(WIDESTR(str)) + 2 - 2, USB_DT_STRING, WIDESTR(str) })
extern struct usb_string_desc *usb_serialno_desc;
#endif
/* Use these macros for declaring descriptors, to order them properly */
-#define USB_CONF_DESC_VAR(name, varname) varname \
- __keep __attribute__((section(".rodata.usb_desc_" STRINGIFY(name))))
+#define USB_CONF_DESC_VAR(name, varname) \
+ varname __keep \
+ __attribute__((section(".rodata.usb_desc_" STRINGIFY(name))))
#define USB_CONF_DESC(name) USB_CONF_DESC_VAR(name, CONCAT2(usb_desc_, name))
#define USB_IFACE_DESC(num) USB_CONF_DESC(CONCAT3(iface, num, _0iface))
#define USB_CUSTOM_DESC_VAR(i, name, varname) \
