source: rtems/cpukit/libmisc/serdbg/termios_printk_cnf.h @ 9e633f5

4.104.114.84.95
Last change on this file since 9e633f5 was 9e633f5, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 27, 2002 at 9:25:14 PM

2002-06-25 Thomas Doerfler <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.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*===============================================================*\
2| Project: RTEMS configure remote gdb over serial line            |
3+-----------------------------------------------------------------+
4| File: termios_printk_cnf.h                                      |
5+-----------------------------------------------------------------+
6|                    Copyright (c) 2002 IMD                       |
7|      Ingenieurbuero fuer Microcomputertechnik Th. Doerfler      |
8|               <Thomas.Doerfler@imd-systems.de>                  |
9|                       all rights reserved                       |
10+-----------------------------------------------------------------+
11| this file declares intialization functions to add               |
12| printk support via polled termios                               |
13|                                                                 |
14+-----------------------------------------------------------------+
15|   date                      history                        ID   |
16| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
17| 13.05.02  creation                                         doe  |
18\*===============================================================*/
19/*
20 * $Id$
21 */
22#ifndef _TERMIOS_PRINTK_CNF_H
23#define _TERMIOS_PRINTK_CNF_H
24
25#include "termios_printk.h"
26
27#ifdef CONFIGURE_INIT
28
29/*
30 * fallback for baud rate to use
31 */
32#ifndef CONFIGURE_TERMIOS_PRINTK_BAUDRATE
33#define CONFIGURE_TERMIOS_PRINTK_BAUDRATE 9600
34#endif
35
36/*
37 * fallback for device name to use
38 */
39#ifndef CONFIGURE_TERMIOS_PRINTK_DEVNAME
40#define CONFIGURE_TERMIOS_PRINTK_DEVNAME "/dev/console"
41#endif
42
43#ifdef CONFIGURE_USE_TERMIOS_PRINTK
44/*
45 * fill in termios_printk_conf structure
46 */
47termios_printk_conf_t termios_printk_conf = {
48  CONFIGURE_TERMIOS_PRINTK_BAUDRATE,
49
50#ifdef CONFIGURE_TERMIOS_PRINTK_CALLOUT
51  CONFIGURE_TERMIOS_PRINTK_CALLOUT,
52#else
53  NULL,
54#endif
55  CONFIGURE_TERMIOS_PRINTK_DEVNAME, 
56};
57#endif
58
59int termios_printk_init(void) {
60#ifdef CONFIGURE_USE_TERMIOS_PRINTK
61  return termios_printk_open(termios_printk_conf.devname,
62                             termios_printk_conf.baudrate);
63#else
64  return 0;
65#endif
66}
67
68#endif /* CONFIGURE_INIT */
69
70#endif /* _TERMIOS_PRINTK_CNF_H */
Note: See TracBrowser for help on using the repository browser.