chip/stm32/usb_gpio.h: Format with clang-format
BRANCH=none
TEST=none
@@ -55,13 +55,12 @@ struct usb_gpio_config {
* ENDPOINT is the index of the USB bulk endpoint used for receiving and
* transmitting bytes.
*/
-#define USB_GPIO_CONFIG(NAME, \
- GPIO_LIST, \
- INTERFACE, \
- ENDPOINT) \
+#define USB_GPIO_CONFIG(NAME, GPIO_LIST, INTERFACE, ENDPOINT) \
BUILD_ASSERT(ARRAY_SIZE(GPIO_LIST) <= 32); \
- static usb_uint CONCAT2(NAME, _ep_rx_buffer)[USB_GPIO_RX_PACKET_SIZE / 2] __usb_ram; \
- static usb_uint CONCAT2(NAME, _ep_tx_buffer)[USB_GPIO_TX_PACKET_SIZE / 2] __usb_ram; \
+ static usb_uint CONCAT2( \
+ NAME, _ep_rx_buffer)[USB_GPIO_RX_PACKET_SIZE / 2] __usb_ram; \
+ static usb_uint CONCAT2( \
+ NAME, _ep_tx_buffer)[USB_GPIO_TX_PACKET_SIZE / 2] __usb_ram; \
struct usb_gpio_config const NAME = { \
.state = &((struct usb_gpio_state){}), \
.endpoint = ENDPOINT, \
@@ -70,8 +69,7 @@ struct usb_gpio_config {
.gpios = GPIO_LIST, \
.num_gpios = ARRAY_SIZE(GPIO_LIST), \
}; \
- const struct usb_interface_descriptor \
- USB_IFACE_DESC(INTERFACE) = { \
+ const struct usb_interface_descriptor USB_IFACE_DESC(INTERFACE) = { \
.bLength = USB_DT_INTERFACE_SIZE, \
.bDescriptorType = USB_DT_INTERFACE, \
.bInterfaceNumber = INTERFACE, \
@@ -82,8 +80,7 @@ struct usb_gpio_config {
.bInterfaceProtocol = 0, \
.iInterface = 0, \
}; \
- const struct usb_endpoint_descriptor \
- USB_EP_DESC(INTERFACE, 0) = { \
+ const struct usb_endpoint_descriptor USB_EP_DESC(INTERFACE, 0) = { \
.bLength = USB_DT_ENDPOINT_SIZE, \
.bDescriptorType = USB_DT_ENDPOINT, \
.bEndpointAddress = 0x80 | ENDPOINT, \
@@ -91,8 +88,7 @@ struct usb_gpio_config {
.wMaxPacketSize = USB_GPIO_TX_PACKET_SIZE, \
.bInterval = 10, \
}; \
- const struct usb_endpoint_descriptor \
- USB_EP_DESC(INTERFACE, 1) = { \
+ const struct usb_endpoint_descriptor USB_EP_DESC(INTERFACE, 1) = { \
.bLength = USB_DT_ENDPOINT_SIZE, \
.bDescriptorType = USB_DT_ENDPOINT, \
.bEndpointAddress = ENDPOINT, \
@@ -112,12 +108,9 @@ struct usb_gpio_config {
{ \
usb_gpio_event(&NAME, evt); \
} \
- USB_DECLARE_EP(ENDPOINT, \
- CONCAT2(NAME, _ep_tx), \
- CONCAT2(NAME, _ep_rx), \
+ USB_DECLARE_EP(ENDPOINT, CONCAT2(NAME, _ep_tx), CONCAT2(NAME, _ep_rx), \
CONCAT2(NAME, _ep_event))
-
/*
* These functions are used by the trampoline functions defined above to
* connect USB endpoint events with the generic USB GPIO driver.
