diff options
Diffstat (limited to 'chip/stm32/usart_info_command.c')
-rw-r--r-- | chip/stm32/usart_info_command.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/chip/stm32/usart_info_command.c b/chip/stm32/usart_info_command.c deleted file mode 100644 index 2649a97351..0000000000 --- a/chip/stm32/usart_info_command.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2015 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - * - * Console command to query USART state - */ -#include "atomic.h" -#include "common.h" -#include "console.h" -#include "usart.h" - -static int command_usart_info(int argc, char **argv) -{ - struct usart_configs configs = usart_get_configs(); - size_t i; - - for (i = 0; i < configs.count; i++) { - struct usart_config const *config = configs.configs[i]; - - if (config == NULL) - continue; - - ccprintf( - "USART%d\n" - " dropped %d bytes\n" - " overran %d times\n", - config->hw->index + 1, - atomic_clear((uint32_t *)&(config->state->rx_dropped)), - atomic_clear((uint32_t *)&(config->state->rx_overrun))); - - if (config->rx->info) - config->rx->info(config); - - if (config->tx->info) - config->tx->info(config); - } - - return EC_SUCCESS; -} - -DECLARE_CONSOLE_COMMAND(usart_info, - command_usart_info, - NULL, - "Display USART info"); |