From 9e633f58da0e7a5e07da0becdd81b43ab2ea227c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 27 Jun 2002 21:25:14 +0000 Subject: 2002-06-25 Thomas Doerfler * With the addition of serdbg, the standard polled I/O functions for gdbstub and/or printk are optionally routed to any termios-aware device driver, that supports polled mode. See libmisc/serdbg/README. * serdbg/Makefile.am, serdbg/README, serdbg/serdbg.c, serdbg/serdbg.h, serdbg/serdbgcnf.h, serdbg/serdbgio.c, serdbg/termios_printk.c, serdbg/termios_printk.h, serdbg/termios_printk_cnf.h, serdbg/.cvsignore: New files. * configure.ac, Makefile.am, wrapup/Makefile.am: Modified to reflect addition. --- cpukit/libmisc/serdbg/termios_printk_cnf.h | 70 ++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 cpukit/libmisc/serdbg/termios_printk_cnf.h (limited to 'cpukit/libmisc/serdbg/termios_printk_cnf.h') diff --git a/cpukit/libmisc/serdbg/termios_printk_cnf.h b/cpukit/libmisc/serdbg/termios_printk_cnf.h new file mode 100644 index 0000000000..73ad1e112e --- /dev/null +++ b/cpukit/libmisc/serdbg/termios_printk_cnf.h @@ -0,0 +1,70 @@ +/*===============================================================*\ +| Project: RTEMS configure remote gdb over serial line | ++-----------------------------------------------------------------+ +| File: termios_printk_cnf.h | ++-----------------------------------------------------------------+ +| Copyright (c) 2002 IMD | +| Ingenieurbuero fuer Microcomputertechnik Th. Doerfler | +| | +| all rights reserved | ++-----------------------------------------------------------------+ +| this file declares intialization functions to add | +| printk support via polled termios | +| | ++-----------------------------------------------------------------+ +| date history ID | +| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +| 13.05.02 creation doe | +\*===============================================================*/ +/* + * $Id$ + */ +#ifndef _TERMIOS_PRINTK_CNF_H +#define _TERMIOS_PRINTK_CNF_H + +#include "termios_printk.h" + +#ifdef CONFIGURE_INIT + +/* + * fallback for baud rate to use + */ +#ifndef CONFIGURE_TERMIOS_PRINTK_BAUDRATE +#define CONFIGURE_TERMIOS_PRINTK_BAUDRATE 9600 +#endif + +/* + * fallback for device name to use + */ +#ifndef CONFIGURE_TERMIOS_PRINTK_DEVNAME +#define CONFIGURE_TERMIOS_PRINTK_DEVNAME "/dev/console" +#endif + +#ifdef CONFIGURE_USE_TERMIOS_PRINTK +/* + * fill in termios_printk_conf structure + */ +termios_printk_conf_t termios_printk_conf = { + CONFIGURE_TERMIOS_PRINTK_BAUDRATE, + +#ifdef CONFIGURE_TERMIOS_PRINTK_CALLOUT + CONFIGURE_TERMIOS_PRINTK_CALLOUT, +#else + NULL, +#endif + CONFIGURE_TERMIOS_PRINTK_DEVNAME, +}; +#endif + +int termios_printk_init(void) { +#ifdef CONFIGURE_USE_TERMIOS_PRINTK + return termios_printk_open(termios_printk_conf.devname, + termios_printk_conf.baudrate); +#else + return 0; +#endif +} + +#endif /* CONFIGURE_INIT */ + +#endif /* _TERMIOS_PRINTK_CNF_H */ -- cgit v1.2.3