mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-05 22:41:44 +00:00
Since pretty much always, we've declared console commands to take a "longhelp" argument with detailed explanations of what the command does. But since almost as long, we've never actually used that argument for anything - we just silently throw it away in the macro. There's only one command (usbchargemode) that even thinks it defines that argument. We're never going to use this, let's just get rid of it. BUG=none BRANCH=none CQ-DEPEND=CL:*279060 CQ-DEPEND=CL:*279158 CQ-DEPEND=CL:*279037 TEST=make buildall; tested on Cr50 hardware Everything builds. Since we never used this arg anyway, there had better not be any difference in the result. Change-Id: Id3f71a53d02e3dc625cfcc12aa71ecb50e35eb9f Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/374163 Reviewed-by: Myles Watson <mylesgw@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
44 lines
995 B
C
44 lines
995 B
C
/* 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_read_clear(&(config->state->rx_dropped)),
|
|
atomic_read_clear(&(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");
|