chip/stm32/usb_hw.h: Format with clang-format
BRANCH=none
TEST=none
@@ -19,7 +19,6 @@ enum usb_ep_event {
#include "usb_dwc_hw.h"
#else
-
/*
* The STM32 has dedicated USB RAM visible on the APB1 bus (so all reads &
* writes are 16-bits wide). The endpoint tables and the data buffers live in
@@ -87,8 +86,8 @@ enum usb_desc_patch_type {
* The patches need to be setup before _before_ usb_init is executed (or, at
* least, before the first call to memcpy_to_usbram_ep0_patch).
*/
-void set_descriptor_patch(enum usb_desc_patch_type type,
- const void *address, uint16_t data);
+void set_descriptor_patch(enum usb_desc_patch_type type, const void *address,
+ uint16_t data);
/* Copy to USB ram, applying patches to src as required. */
void *memcpy_to_usbram_ep0_patch(const void *src, size_t n);
@@ -113,13 +112,12 @@ void *memcpy_to_usbram_ep0_patch(const void *src, size_t n);
__attribute__((alias(STRINGIFY(rx_handler)))); \
void _EP_EVENT_HANDLER(num)(enum usb_ep_event evt) \
__attribute__((alias(STRINGIFY(evt_handler)))); \
- static __unused void \
- (*_EP_TX_HANDLER_TYPECHECK(num))(void) = tx_handler; \
- static __unused void \
- (*_EP_RX_HANDLER_TYPECHECK(num))(void) = rx_handler; \
- static __unused void \
- (*_EP_EVENT_HANDLER_TYPECHECK(num))(enum usb_ep_event evt)\
- = evt_handler
+ static __unused void (*_EP_TX_HANDLER_TYPECHECK(num))(void) = \
+ tx_handler; \
+ static __unused void (*_EP_RX_HANDLER_TYPECHECK(num))(void) = \
+ rx_handler; \
+ static __unused void (*_EP_EVENT_HANDLER_TYPECHECK(num))( \
+ enum usb_ep_event evt) = evt_handler
/* arrays with all endpoint callbacks */
extern void (*usb_ep_tx[])(void);
@@ -134,8 +132,7 @@ extern int (*usb_iface_request[]) (usb_uint *ep0_buf_rx, usb_uint *ep0_buf_tx);
*/
#define _IFACE_HANDLER(num) CONCAT3(iface_, num, _request)
#define USB_DECLARE_IFACE(num, handler) \
- int _IFACE_HANDLER(num)(usb_uint *ep0_buf_rx, \
- usb_uint *epo_buf_tx) \
+ int _IFACE_HANDLER(num)(usb_uint * ep0_buf_rx, usb_uint * epo_buf_tx) \
__attribute__((alias(STRINGIFY(handler))));
#endif
