Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/wl/include/hndrte_cons.h
Views: 3960
/*1* Console support for hndrte.2*3* $Copyright Open Broadcom Corporation$4*5* $Id: hndrte_cons.h 383575 2013-02-07 03:10:23Z $6*/7#ifndef _HNDRTE_CONS_H8#define _HNDRTE_CONS_H910#include <typedefs.h>1112#if defined(RWL_DONGLE) || defined(UART_REFLECTOR)13/* For Dongle uart tranport max cmd len is 256 bytes + header length (16 bytes)14* In case of ASD commands we are not sure about how much is the command size15* To be on the safe side, input buf len CBUF_LEN is increased to max (512) bytes.16*/17#define RWL_MAX_DATA_LEN (512 + 8) /* allow some extra bytes for '/n' termination */18#define CBUF_LEN (RWL_MAX_DATA_LEN + 64) /* allow 64 bytes for header ("rwl...") */19#else20#define CBUF_LEN (128)21#endif /* RWL_DONGLE || UART_REFLECTOR */2223#define LOG_BUF_LEN 10242425typedef struct {26uint32 buf; /* Can't be pointer on (64-bit) hosts */27uint buf_size;28uint idx;29char *_buf_compat; /* redundant pointer for backward compat. */30} hndrte_log_t;3132typedef struct {33/* Virtual UART34* When there is no UART (e.g. Quickturn), the host should write a complete35* input line directly into cbuf and then write the length into vcons_in.36* This may also be used when there is a real UART (at risk of conflicting with37* the real UART). vcons_out is currently unused.38*/39volatile uint vcons_in;40volatile uint vcons_out;4142/* Output (logging) buffer43* Console output is written to a ring buffer log_buf at index log_idx.44* The host may read the output when it sees log_idx advance.45* Output will be lost if the output wraps around faster than the host polls.46*/47hndrte_log_t log;4849/* Console input line buffer50* Characters are read one at a time into cbuf until <CR> is received, then51* the buffer is processed as a command line. Also used for virtual UART.52*/53uint cbuf_idx;54char cbuf[CBUF_LEN];55} hndrte_cons_t;5657hndrte_cons_t *hndrte_get_active_cons_state(void);5859#endif /* _HNDRTE_CONS_H */606162