* Makefile.in (SFILES): Add ser-base.c.
(ser_base_h): New variable. (ser-base.o): New target. (ser-pipe.o): Depend on $(ser_base_h). (ser-tcp.o): Likewise. (ser-unix.o): Likewise. Do not depend on $(event_loop_h). * configure.ac (SER_HARDWIRE): Include ser-base.o where appropriate. * ser-base.c: New file. (push_event): Move from ser-unix.c. (fd_event): Likewise. (reschedule): Likewise. (ser_unix_write): Likewise. (ser_unix_nop_flush_output): Likewise. (ser_unix_flush_input): Likewise. (ser_unix_nop_send_break): Likewise. (ser_unix_nop_drain_output): Likewise. (ser_unix_nop_raw): Likewise. (ser_unix_nop_get_tty_state): Likewise. (ser_unix_nop_set_tty_state): Likewise. (ser_unix_nop_noflush_set_tty_state): Likewise. (ser_unix_nop_print_tty_state): Likewise. (ser_unix_nop_setbaudrate): Likewise. (ser_unix_nop_setstopbits): Likewise. (ser_unix_async): Likewise. * ser-base.h: New file. * ser-pipe.c (ser-base.h): Include it. * ser-tcp.c (ser-base.h): Likewise. * ser-unix.h (ser_unix_nop_flush_output): Remove. (ser_unix_flush_input): Likewise. (ser_unix_nop_send_break): Likewise. (ser_unix_nop_raw): Likewise. (ser_unix_nop_get_tty_state): Likewise. (ser_unix_nop_set_tty_state): Likewise. (ser_unix_nop_print_tty_state): Likewise. (ser_unix_nop_noflush_set_tty_state): Likewise. (ser_unix_nop_setbaudrate): Likewise. (ser_unix_nop_setstopbits): Likewise. (ser_unix_nop_drain_output): Likewise. (ser_unix_wait_for): Likewise. (ser_unix_write): Likewise. (ser_unix_async): Likewise. * ser-unix.c (event-loop.h): Do not include it. (push_event): Move to ser-base.c. (fd_event): Likewise. (reschedule): Likewise. (ser_unix_write): Likewise. (ser_unix_nop_flush_output): Likewise. (ser_unix_flush_input): Likewise. (ser_unix_nop_send_break): Likewise. (ser_unix_nop_drain_output): Likewise. (ser_unix_nop_raw): Likewise. (ser_unix_nop_get_tty_state): Likewise. (ser_unix_nop_set_tty_state): Likewise. (ser_unix_nop_noflush_set_tty_state): Likewise. (ser_unix_nop_print_tty_state): Likewise. (ser_unix_nop_setbaudrate): Likewise. (ser_unix_nop_setstopbits): Likewise. (ser_unix_async): Likewise. (ser_unix_wait_for): Make it static. * configure: Regenerated.
This commit is contained in:
parent
8d5a9abc72
commit
3eb25fda5d
10 changed files with 437 additions and 323 deletions
50
gdb/ser-base.h
Normal file
50
gdb/ser-base.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* Generic serial interface functions.
|
||||
|
||||
Copyright 2005 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef SER_BASE_H
|
||||
#define SER_BASE_H
|
||||
|
||||
struct serial;
|
||||
struct ui_file;
|
||||
|
||||
extern void reschedule (struct serial *scb);
|
||||
extern int ser_unix_nop_flush_output (struct serial *scb);
|
||||
extern int ser_unix_flush_input (struct serial *scb);
|
||||
extern int ser_unix_nop_send_break (struct serial *scb);
|
||||
extern void ser_unix_nop_raw (struct serial *scb);
|
||||
extern serial_ttystate ser_unix_nop_get_tty_state (struct serial *scb);
|
||||
extern int ser_unix_nop_set_tty_state (struct serial *scb,
|
||||
serial_ttystate ttystate);
|
||||
extern void ser_unix_nop_print_tty_state (struct serial *scb,
|
||||
serial_ttystate ttystate,
|
||||
struct ui_file *stream);
|
||||
extern int ser_unix_nop_noflush_set_tty_state (struct serial *scb,
|
||||
serial_ttystate new_ttystate,
|
||||
serial_ttystate old_ttystate);
|
||||
extern int ser_unix_nop_setbaudrate (struct serial *scb, int rate);
|
||||
extern int ser_unix_nop_setstopbits (struct serial *scb, int rate);
|
||||
extern int ser_unix_nop_drain_output (struct serial *scb);
|
||||
|
||||
extern int ser_unix_write (struct serial *scb, const char *str, int len);
|
||||
|
||||
extern void ser_unix_async (struct serial *scb, int async_p);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue