diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-04-24 17:55:01 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-04-24 18:34:46 -0700 |
commit | 470916fb0f856945f2a93c7fd160845b5f659be1 (patch) | |
tree | 18652a5cff68223ec72650afc12e1e2e727c8529 /common/usb_charge.c | |
parent | 135f14bf498ab19b6e75efc3a0d18ef7c8a8752d (diff) | |
download | chrome-ec-470916fb0f856945f2a93c7fd160845b5f659be1.tar.gz |
Use console output instead of uart output for console commands
This completes console output cleanup. The remaining calls to
uart_puts() and uart_printf() actually need to be that way.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:7464
TEST=manual
Change-Id: Ib1d6d370d30429017b3d11994894fece75fab6ea
Diffstat (limited to 'common/usb_charge.c')
-rw-r--r-- | common/usb_charge.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/usb_charge.c b/common/usb_charge.c index f14cfe393d..ace535fbe4 100644 --- a/common/usb_charge.c +++ b/common/usb_charge.c @@ -9,10 +9,10 @@ #include "console.h" #include "gpio.h" #include "hooks.h" -#include "uart.h" #include "usb_charge.h" #include "util.h" + static void usb_charge_set_control_mode(int port_id, int mode) { if (port_id == 0) { @@ -91,28 +91,28 @@ static int command_set_mode(int argc, char **argv) char* endptr; if (argc != 3) { - uart_puts("Usage: usbchargemode <port_id> <mode>\n"); - uart_puts("Modes: 0=Disabled.\n" - " 1=Dedicated charging. Auto select.\n" - " 2=Dedicated charging. BC 1.2.\n" - " 3=Downstream. Max 500mA.\n" - " 4=Downstream. Max 1.5A.\n"); + ccputs("Usage: usbchargemode <port_id> <mode>\n"); + ccputs("Modes: 0=Disabled.\n" + " 1=Dedicated charging. Auto select.\n" + " 2=Dedicated charging. BC 1.2.\n" + " 3=Downstream. Max 500mA.\n" + " 4=Downstream. Max 1.5A.\n"); return EC_ERROR_UNKNOWN; } port_id = strtoi(argv[1], &endptr, 0); if (*endptr || port_id < 0 || port_id >= USB_CHARGE_PORT_COUNT) { - uart_puts("Invalid port ID.\n"); + ccputs("Invalid port ID.\n"); return EC_ERROR_UNKNOWN; } mode = strtoi(argv[2], &endptr, 0); if (*endptr || mode < 0 || mode >= USB_CHARGE_MODE_COUNT) { - uart_puts("Invalid mode.\n"); + ccputs("Invalid mode.\n"); return EC_ERROR_UNKNOWN; } - uart_printf("Setting USB mode...\n"); + ccprintf("Setting USB mode...\n"); return usb_charge_set_mode(port_id, mode); } DECLARE_CONSOLE_COMMAND(usbchargemode, command_set_mode); |