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/memory_commands.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/memory_commands.c')
-rw-r--r-- | common/memory_commands.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/common/memory_commands.c b/common/memory_commands.c index 476aa92498..e8bff757cd 100644 --- a/common/memory_commands.c +++ b/common/memory_commands.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +/* Copyright (c) 2012 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. */ @@ -6,7 +6,6 @@ /* System module for Chrome EC */ #include "console.h" -#include "uart.h" #include "util.h" @@ -16,14 +15,14 @@ static int command_write_word(int argc, char **argv) uint32_t value; if (argc != 3) { - uart_puts("Usage: ww <address> <value>\n"); + ccputs("Usage: ww <address> <value>\n"); return EC_ERROR_UNKNOWN; } address = (uint32_t*)strtoi(argv[1], NULL, 0); value = strtoi(argv[2], NULL, 0); - uart_printf("write word 0x%p = 0x%08x\n", address, value); - uart_flush_output(); + ccprintf("write word 0x%p = 0x%08x\n", address, value); + cflush(); /* Flush before writing in case this crashes */ *address = value; @@ -39,14 +38,13 @@ static int command_read_word(int argc, char **argv) uint32_t value; if (argc != 2) { - uart_puts("Usage: rw <address>\n"); + ccputs("Usage: rw <address>\n"); return EC_ERROR_UNKNOWN; } address = (uint32_t*)strtoi(argv[1], NULL, 0); value = *address; - uart_printf("read word 0x%p = 0x%08x\n", address, value); - uart_flush_output(); + ccprintf("read word 0x%p = 0x%08x\n", address, value); return EC_SUCCESS; } |