summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-07-23 18:13:15 -0700
committerChromeBot <chrome-bot@google.com>2013-07-24 16:31:14 -0700
commite6f0c272a02d03a15f826b8c7282d0084c125b6b (patch)
tree35e57a253ef0dbd1692c06f57a3cdf9ed092d476 /common
parentb13a2aed146c7e54c21fe5d84f0a3ff1989a612b (diff)
downloadchrome-ec-e6f0c272a02d03a15f826b8c7282d0084c125b6b.tar.gz
Clean up and document UART config options
No functional changes, just renaming config options. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms Change-Id: I91584cb1f8990dd0f980abd32c04465a66243e71 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63244
Diffstat (limited to 'common')
-rw-r--r--common/console.c2
-rw-r--r--common/uart_buffering.c17
2 files changed, 3 insertions, 16 deletions
diff --git a/common/console.c b/common/console.c
index 077bd28b13..dd12613f9a 100644
--- a/common/console.c
+++ b/common/console.c
@@ -17,7 +17,7 @@
#define PROMPT "> "
/* Current console command line */
-static char input_buf[CONSOLE_INPUT_LINE_SIZE];
+static char input_buf[CONFIG_CONSOLE_INPUT_LINE_SIZE];
/**
* Split a line of input into words.
diff --git a/common/uart_buffering.c b/common/uart_buffering.c
index 277ae90a16..42d9d4e487 100644
--- a/common/uart_buffering.c
+++ b/common/uart_buffering.c
@@ -16,19 +16,6 @@
#include "uart.h"
#include "util.h"
-/*
- * Transmit and receive buffer sizes must be power of 2 for the macros below
- * to work properly.
- */
-#ifndef CONFIG_UART_TX_BUF_SIZE
-#define CONFIG_UART_TX_BUF_SIZE 512
-#endif
-
-#ifndef CONFIG_UART_RX_BUF_SIZE
-/* Must be larger than CONSOLE_INPUT_LINE_SIZE to copy and paste scripts */
-#define CONFIG_UART_RX_BUF_SIZE 128
-#endif
-
#define HISTORY_SIZE 8
/* Macros to advance in the circular buffers */
@@ -52,7 +39,7 @@ static volatile int tx_buf_tail;
static volatile char rx_buf[CONFIG_UART_RX_BUF_SIZE];
static volatile int rx_buf_head;
static volatile int rx_buf_tail;
-static volatile char rx_cur_buf[CONSOLE_INPUT_LINE_SIZE];
+static volatile char rx_cur_buf[CONFIG_CONSOLE_INPUT_LINE_SIZE];
static volatile int rx_cur_buf_tail;
static volatile int rx_cur_buf_head;
static volatile int rx_cur_buf_ptr;
@@ -232,7 +219,7 @@ static void insert_char(char c)
int ptr;
/* On overflow, discard input */
- if (rx_cur_buf_head == CONSOLE_INPUT_LINE_SIZE && c != '\n')
+ if (rx_cur_buf_head == CONFIG_CONSOLE_INPUT_LINE_SIZE && c != '\n')
return;
/* Move buffer ptr to the end if 'c' is new line */