OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [libmisc/] [serdbg/] [termios_printk_cnf.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*===============================================================*\
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
 * termios_printk_cnf.h,v 1.1 2002/06/27 21:25:14 joel Exp
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
 */
47
termios_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
 
59
int 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 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.