Lines Matching defs:serial

1 /* Remote serial support interface definitions for GDB, the GNU Debugger.
34 struct serial;
36 /* Try to open NAME. Returns a new `struct serial *' on success, NULL
42 extern struct serial *serial_open (const char *name);
44 /* Open a new serial stream using a file handle. */
46 extern struct serial *serial_fdopen (const int fd);
50 extern void serial_close (struct serial *scb);
54 extern void serial_un_fdopen (struct serial *scb);
56 /* Read one char from the serial device with TIMEOUT seconds to wait
72 extern int serial_readchar (struct serial *scb, int timeout);
77 extern int serial_write (struct serial *scb, const char *str, int len);
79 /* Write a printf style string onto the serial port. */
81 extern void serial_printf (struct serial *desc, const char *,...) ATTR_FORMAT (printf, 2, 3);
85 extern int serial_drain_output (struct serial *);
90 extern int serial_flush_output (struct serial *);
95 extern int serial_flush_input (struct serial *);
99 extern int serial_send_break (struct serial *scb);
103 extern void serial_raw (struct serial *scb);
108 extern serial_ttystate serial_get_tty_state (struct serial *scb);
115 extern int serial_set_tty_state (struct serial *scb, serial_ttystate ttystate);
121 extern void serial_print_tty_state (struct serial *scb, serial_ttystate ttystate, struct ui_file *);
129 extern int serial_noflush_set_tty_state (struct serial *scb, serial_ttystate new_ttystate, serial_ttystate old_ttystate);
134 extern int serial_setbaudrate (struct serial *scb, int rate);
143 extern int serial_setstopbits (struct serial *scb, int num);
145 /* Asynchronous serial interface: */
147 /* Can the serial device support asynchronous mode? */
149 extern int serial_can_async_p (struct serial *scb);
151 /* Has the serial device been put in asynchronous mode? */
153 extern int serial_is_async_p (struct serial *scb);
159 typedef void (serial_event_ftype) (struct serial *scb, void *context);
160 extern void serial_async (struct serial *scb, serial_event_ftype *handler, void *context);
163 implement the serial device. This interface is clearly
165 applicable to the current serial device. */
167 extern int deprecated_serial_fd (struct serial *scb);
174 extern void serial_debug (struct serial *scb, int debug_p);
176 extern int serial_debug_p (struct serial *scb);
179 /* Details of an instance of a serial object */
181 struct serial
197 struct serial *next; /* Pointer to the next `struct serial *' */
199 int debug_p; /* Trace this serial devices operation. */
209 int (*open) (struct serial *, const char *name);
210 void (*close) (struct serial *);
211 int (*readchar) (struct serial *, int timeout);
212 int (*write) (struct serial *, const char *str, int len);
214 int (*flush_output) (struct serial *);
216 int (*flush_input) (struct serial *);
217 int (*send_break) (struct serial *);
218 void (*go_raw) (struct serial *);
219 serial_ttystate (*get_tty_state) (struct serial *);
220 int (*set_tty_state) (struct serial *, serial_ttystate);
221 void (*print_tty_state) (struct serial *, serial_ttystate,
223 int (*noflush_set_tty_state) (struct serial *, serial_ttystate,
225 int (*setbaudrate) (struct serial *, int rate);
226 int (*setstopbits) (struct serial *, int num);
228 int (*drain_output) (struct serial *);
229 /* Change the serial device into/out of asynchronous mode, call
232 void (*async) (struct serial *scb, int async_p);
235 /* Add a new serial interface to the interface list */