diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-06-27 21:25:14 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-06-27 21:25:14 +0000 |
commit | 9e633f58da0e7a5e07da0becdd81b43ab2ea227c (patch) | |
tree | 9600a2157eec583dabde35d2eba10a47268a64f8 /cpukit/libmisc/serdbg/termios_printk_cnf.h | |
parent | 2002-06-27 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-9e633f58da0e7a5e07da0becdd81b43ab2ea227c.tar.bz2 |
2002-06-25 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>
* 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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libmisc/serdbg/termios_printk_cnf.h | 70 |
1 files changed, 70 insertions, 0 deletions
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 | +| <Thomas.Doerfler@imd-systems.de> | +| 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 */ |