File tree Expand file tree Collapse file tree 2 files changed +32
-93
lines changed Expand file tree Collapse file tree 2 files changed +32
-93
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5353#include <stdlib.h>
5454#include <signal.h>
5555#include <debug.h>
56+ #include <stdint.h>
57+ #include <stdbool.h>
58+ #include <semaphore.h>
59+ #include <termios.h>
5660
5761#include "system/readline.h"
5862
59- #include "cu.h"
63+ /****************************************************************************
64+ * Pre-processor Definitions
65+ ****************************************************************************/
66+
67+ /* Configuration ************************************************************/
68+
69+ #ifndef CONFIG_SYSTEM_CUTERM_DEFAULT_DEVICE
70+ # define CONFIG_SYSTEM_CUTERM_DEFAULT_DEVICE "/dev/ttyS0"
71+ #endif
72+
73+ #ifndef CONFIG_SYSTEM_CUTERM_DEFAULT_BAUD
74+ # define CONFIG_SYSTEM_CUTERM_DEFAULT_BAUD 115200
75+ #endif
6076
6177#ifdef CONFIG_SYSTEM_CUTERM_DISABLE_ERROR_PRINT
6278# define cu_error (...)
@@ -75,6 +91,21 @@ enum parity_mode
7591 PARITY_ODD ,
7692};
7793
94+ /* All terminal state data is packaged in a single structure to minimize
95+ * name conflicts with other global symbols -- a poor man's name space.
96+ */
97+
98+ struct cu_globals_s
99+ {
100+ int devfd ; /* I/O data to serial port */
101+ int stdfd ; /* I/O data to standard console */
102+ int escape ; /* Escape char */
103+ struct termios devtio ; /* Original serial port setting */
104+ struct termios stdtio ; /* Original standard console setting */
105+ pthread_t listener ; /* Terminal listener thread */
106+ bool force_exit ; /* Force exit */
107+ };
108+
78109/****************************************************************************
79110 * Private Data
80111 ****************************************************************************/
You can’t perform that action at this time.
0 commit comments