source: rtems/cpukit/libmisc/serdbg/termios_printk.h @ dc2a1750

4.104.114.84.95
Last change on this file since dc2a1750 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: 5.0 KB
Line 
1/*===============================================================*\
2| Project: RTEMS remote gdb over serial line                      |
3+-----------------------------------------------------------------+
4| File: termios_printk.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 polled output via termios polled drivers                 |
13|                                                                 |
14+-----------------------------------------------------------------+
15|   date                      history                        ID   |
16| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
17| 13.04.02  creation                                         doe  |
18\*===============================================================*/
19/*
20 * $Id$
21 */
22#ifndef _TERMIOS_PRINTK_H
23#define _TERMIOS_PRINTK_H
24
25#include <rtems.h>
26#include <termios.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32typedef struct {
33  uint32_t   baudrate;      /* debug baud rate, e.g. 57600            */
34  void (*callout)(void);    /* callout pointer during polling         */
35  const char *devname;      /* debug device, e.g. "/dev/tty01"        */
36} termios_printk_conf_t;
37
38/*
39 * must be defined in init module...
40 */
41extern termios_printk_conf_t termios_printk_conf;
42
43/*=========================================================================*\
44| Function:                                                                 |
45\*-------------------------------------------------------------------------*/
46void termios_printk_outputchar
47/*-------------------------------------------------------------------------*\
48| Purpose:                                                                  |
49|    send one character to serial port                                      |
50+---------------------------------------------------------------------------+
51| Input Parameters:                                                         |
52\*-------------------------------------------------------------------------*/
53(
54 char c  /* character to print */
55 );
56/*-------------------------------------------------------------------------*\
57| Return Value:                                                             |
58|    <none>                                                                 |
59\*=========================================================================*/
60
61/*=========================================================================*\
62| Function:                                                                 |
63\*-------------------------------------------------------------------------*/
64char termios_printk_inputchar
65/*-------------------------------------------------------------------------*\
66| Purpose:                                                                  |
67|    wait for one character from serial port                                |
68+---------------------------------------------------------------------------+
69| Input Parameters:                                                         |
70\*-------------------------------------------------------------------------*/
71(
72 void  /* none */
73 );
74/*-------------------------------------------------------------------------*\
75| Return Value:                                                             |
76|    received character                                                     |
77\*=========================================================================*/
78
79
80/*=========================================================================*\
81| Function:                                                                 |
82\*-------------------------------------------------------------------------*/
83int termios_printk_open
84
85/*-------------------------------------------------------------------------*\
86| Purpose:                                                                  |
87|    try to open given serial debug port                                    |
88+---------------------------------------------------------------------------+
89| Input Parameters:                                                         |
90\*-------------------------------------------------------------------------*/
91(
92 const char *dev_name, /* name of device to open */
93 uint32_t   baudrate   /* baud rate to use       */
94 );
95/*-------------------------------------------------------------------------*\
96| Return Value:                                                             |
97|    0 on success, -1 and errno otherwise                                   |
98\*=========================================================================*/
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* _TERMIOS_PRINTK_H */
Note: See TracBrowser for help on using the repository browser.