2 * Console support for hndrte.
4 * Copyright (C) 2010, Broadcom Corporation
7 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
8 * the contents of this file may not be disclosed to third parties, copied
9 * or duplicated in any form, in whole or in part, without the prior
10 * written permission of Broadcom Corporation.
12 * $Id: hndrte_cons.h,v 13.4 2009-10-08 21:49:58 Exp $
17 #if defined(RWL_DONGLE) || defined(UART_REFLECTOR)
18 /* For Dongle uart tranport max cmd len is 256 bytes + header length (16 bytes)
19 * In case of ASD commands we are not sure about how much is the command size
20 * To be on the safe side, input buf len CBUF_LEN is increased to max (512) bytes.
22 #define RWL_MAX_DATA_LEN (512 + 8) /* allow some extra bytes for '/n' termination */
23 #define CBUF_LEN (RWL_MAX_DATA_LEN + 64) /* allow 64 bytes for header ("rwl...") */
25 #define CBUF_LEN (128)
26 #endif /* RWL_DONGLE || UART_REFLECTOR */
29 #define LOG_BUF_LEN (16 * 1024)
31 #define LOG_BUF_LEN 1024
38 char *_buf_compat
; /* redundant pointer for backward compat. */
43 * When there is no UART (e.g. Quickturn), the host should write a complete
44 * input line directly into cbuf and then write the length into vcons_in.
45 * This may also be used when there is a real UART (at risk of conflicting with
46 * the real UART). vcons_out is currently unused.
48 volatile uint vcons_in
;
49 volatile uint vcons_out
;
51 /* Output (logging) buffer
52 * Console output is written to a ring buffer log_buf at index log_idx.
53 * The host may read the output when it sees log_idx advance.
54 * Output will be lost if the output wraps around faster than the host polls.
58 /* Console input line buffer
59 * Characters are read one at a time into cbuf until <CR> is received, then
60 * the buffer is processed as a command line. Also used for virtual UART.