chip/stm32/usb_console.c: Format with clang-format
BRANCH=none
TEST=none
#define CPRINTF(format, args...) cprintf(CC_USB, format, ##args)
#define USB_CONSOLE_TIMEOUT_US (30 * MSEC)
-static struct queue const tx_q = QUEUE_NULL(CONFIG_USB_CONSOLE_TX_BUF_SIZE,
- uint8_t);
+static struct queue const tx_q =
+ QUEUE_NULL(CONFIG_USB_CONSOLE_TX_BUF_SIZE, uint8_t);
static struct queue const rx_q = QUEUE_NULL(USB_MAX_PACKET_SIZE, uint8_t);
static int last_tx_ok = 1;
@@ -81,8 +81,7 @@ static void con_ep_rx(void)
for (i = 0; i < (btable_ep[USB_EP_CONSOLE].rx_count & RX_COUNT_MASK);
i++) {
- int val = ((i & 1) ?
- (ep_buf_rx[i >> 1] >> 8) :
+ int val = ((i & 1) ? (ep_buf_rx[i >> 1] >> 8) :
(ep_buf_rx[i >> 1] & 0xff));
QUEUE_ADD_UNITS(&rx_q, &val, 1);
@@ -107,11 +106,11 @@ static void ep_event(enum usb_ep_event evt)
btable_ep[USB_EP_CONSOLE].rx_count =
0x8000 | ((USB_MAX_PACKET_SIZE / 32 - 1) << 10);
- STM32_USB_EP(USB_EP_CONSOLE) = (USB_EP_CONSOLE | /* Endpoint Addr */
+ STM32_USB_EP(USB_EP_CONSOLE) =
+ (USB_EP_CONSOLE | /* Endpoint Addr */
(2 << 4) | /* TX NAK */
(0 << 9) | /* Bulk EP */
- (is_readonly ? EP_RX_NAK
- : EP_RX_VALID));
+ (is_readonly ? EP_RX_NAK : EP_RX_VALID));
is_reset = 1;
}
