source: rtems/cpukit/libmisc/serdbg/termios_printk_cnf.h @ f26145b

4.104.114.84.95
Last change on this file since f26145b was 6f77f16f, checked in by Joel Sherrill <joel.sherrill@…>, on 09/17/04 at 17:00:19

2004-09-17 Joel Sherrill <joel@…>

PR 677/misc

  • libmisc/dumpbuf/dumpbuf.h, libmisc/fsmount/fsmount.h, libmisc/rtmonuse/rtmonuse.h, libmisc/serdbg/serdbg.h, libmisc/serdbg/serdbgcnf.h, libmisc/serdbg/termios_printk.h, libmisc/serdbg/termios_printk_cnf.h, libmisc/untar/untar.h: Add extern C wrappers.
  • 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 <rtems/termios_printk.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#ifdef CONFIGURE_INIT
32
33/*
34 * fallback for baud rate to use
35 */
36#ifndef CONFIGURE_TERMIOS_PRINTK_BAUDRATE
37#define CONFIGURE_TERMIOS_PRINTK_BAUDRATE 9600
38#endif
39
40/*
41 * fallback for device name to use
42 */
43#ifndef CONFIGURE_TERMIOS_PRINTK_DEVNAME
44#define CONFIGURE_TERMIOS_PRINTK_DEVNAME "/dev/console"
45#endif
46
47#ifdef CONFIGURE_USE_TERMIOS_PRINTK
48/*
49 * fill in termios_printk_conf structure
50 */
51termios_printk_conf_t termios_printk_conf = {
52  CONFIGURE_TERMIOS_PRINTK_BAUDRATE,
53
54#ifdef CONFIGURE_TERMIOS_PRINTK_CALLOUT
55  CONFIGURE_TERMIOS_PRINTK_CALLOUT,
56#else
57  NULL,
58#endif
59  CONFIGURE_TERMIOS_PRINTK_DEVNAME,
60};
61#endif
62
63int termios_printk_init(void) {
64#ifdef CONFIGURE_USE_TERMIOS_PRINTK
65  return termios_printk_open(termios_printk_conf.devname,
66                             termios_printk_conf.baudrate);
67#else
68  return 0;
69#endif
70}
71
72#endif /* CONFIGURE_INIT */
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* _TERMIOS_PRINTK_CNF_H */
Note: See TracBrowser for help on using the repository browser.