chip/stm32/usart_host_command.c: Format with clang-format
BRANCH=none
TEST=none
@@ -362,16 +362,13 @@ static void usart_host_command_process_request(void)
* Cancel deferred call to timeout handler as request
* received was good.
*/
- hook_call_deferred(
- &usart_host_command_request_timeout_data,
- -1);
+ hook_call_deferred(&usart_host_command_request_timeout_data, -1);
uart_packet.send_response = usart_host_command_process_response;
uart_packet.request = usart_in_buffer;
uart_packet.request_temp = NULL;
uart_packet.request_max = sizeof(usart_in_buffer);
- uart_packet.request_size =
- host_request_expected_size(ec_request);
+ uart_packet.request_size = host_request_expected_size(ec_request);
uart_packet.response = usart_out_buffer;
uart_packet.response_max = sizeof(usart_out_buffer);
uart_packet.response_size = 0;
@@ -427,14 +424,10 @@ static void usart_host_command_process_response(struct host_packet *pkt)
static void usart_host_command_reset(void)
{
/* Cancel deferred call to process_request. */
- hook_call_deferred(
- &usart_host_command_process_request_data,
- -1);
+ hook_call_deferred(&usart_host_command_process_request_data, -1);
/* Cancel deferred call to timeout handler. */
- hook_call_deferred(
- &usart_host_command_request_timeout_data,
- -1);
+ hook_call_deferred(&usart_host_command_request_timeout_data, -1);
/*
* Disable interrupts before entering critical region
@@ -504,8 +497,7 @@ size_t usart_host_command_rx_append_data(struct usart_config const *config,
current_state == USART_HOST_CMD_RECEIVING ||
(usart_in_head + count) < USART_MAX_REQUEST_SIZE) {
/* Copy all the bytes from DMA FIFO */
- memcpy(usart_in_buffer + usart_in_head,
- src, count);
+ memcpy(usart_in_buffer + usart_in_head, src, count);
}
/*
@@ -551,8 +543,7 @@ size_t usart_host_command_rx_append_data(struct usart_config const *config,
} else if (usart_in_head > usart_in_datalen) {
/* Cancel deferred call to process_request */
hook_call_deferred(
- &usart_host_command_process_request_data,
- -1);
+ &usart_host_command_process_request_data, -1);
/* Move state to overrun*/
current_state = USART_HOST_CMD_RX_OVERRUN;
@@ -579,8 +570,7 @@ size_t usart_host_command_tx_remove_data(struct usart_config const *config,
{
size_t bytes_remaining = 0;
- if (current_state == USART_HOST_CMD_SENDING &&
- usart_out_datalen != 0) {
+ if (current_state == USART_HOST_CMD_SENDING && usart_out_datalen != 0) {
/* Calculate byte_remaining in out_buffer */
bytes_remaining = usart_out_datalen - usart_out_head;
