gdb/ser-base.h - gdb

Macros defined

Source code

  1. /* Generic serial interface functions.

  2.    Copyright (C) 2005-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #ifndef SER_BASE_H
  15. #define SER_BASE_H

  16. struct serial;
  17. struct ui_file;

  18. extern int generic_readchar (struct serial *scb, int timeout,
  19.                              int (*do_readchar) (struct serial *scb,
  20.                                                  int timeout));
  21. extern int ser_base_flush_output (struct serial *scb);
  22. extern int ser_base_flush_input (struct serial *scb);
  23. extern int ser_base_send_break (struct serial *scb);
  24. extern void ser_base_raw (struct serial *scb);
  25. extern serial_ttystate ser_base_get_tty_state (struct serial *scb);
  26. extern serial_ttystate ser_base_copy_tty_state (struct serial *scb,
  27.                                                 serial_ttystate ttystate);
  28. extern int ser_base_set_tty_state (struct serial *scb,
  29.                                    serial_ttystate ttystate);
  30. extern void ser_base_print_tty_state (struct serial *scb,
  31.                                       serial_ttystate ttystate,
  32.                                       struct ui_file *stream);
  33. extern int ser_base_noflush_set_tty_state (struct serial *scb,
  34.                                            serial_ttystate new_ttystate,
  35.                                            serial_ttystate old_ttystate);
  36. extern int ser_base_setbaudrate (struct serial *scb, int rate);
  37. extern int ser_base_setstopbits (struct serial *scb, int rate);
  38. extern int ser_base_drain_output (struct serial *scb);

  39. extern int ser_base_write (struct serial *scb, const void *buf, size_t count);

  40. extern void ser_base_async (struct serial *scb, int async_p);
  41. extern int ser_base_readchar (struct serial *scb, int timeout);

  42. #endif