source: rtems/cpukit/libmisc/serdbg/termios_printk.h @ 52058a6b

4.104.114.84.95
Last change on this file since 52058a6b was 9e633f5, checked in by Joel Sherrill <joel.sherrill@…>, on 06/27/02 at 21:25:14

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: 4.9 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
28typedef struct {
29  unsigned32 baudrate;      /* debug baud rate, e.g. 57600            */
30  void (*callout)(void);    /* callout pointer during polling         */
31  const char *devname;      /* debug device, e.g. "/dev/tty01"        */
32} termios_printk_conf_t;
33
34/*
35 * must be defined in init module...
36 */
37extern termios_printk_conf_t termios_printk_conf;
38
39/*=========================================================================*\
40| Function:                                                                 |
41\*-------------------------------------------------------------------------*/
42void termios_printk_outputchar
43/*-------------------------------------------------------------------------*\
44| Purpose:                                                                  |
45|    send one character to serial port                                      |
46+---------------------------------------------------------------------------+
47| Input Parameters:                                                         |
48\*-------------------------------------------------------------------------*/
49(
50 char c  /* character to print */
51 );
52/*-------------------------------------------------------------------------*\
53| Return Value:                                                             |
54|    <none>                                                                 |
55\*=========================================================================*/
56
57/*=========================================================================*\
58| Function:                                                                 |
59\*-------------------------------------------------------------------------*/
60char termios_printk_inputchar
61/*-------------------------------------------------------------------------*\
62| Purpose:                                                                  |
63|    wait for one character from serial port                                |
64+---------------------------------------------------------------------------+
65| Input Parameters:                                                         |
66\*-------------------------------------------------------------------------*/
67(
68 void  /* none */
69 );
70/*-------------------------------------------------------------------------*\
71| Return Value:                                                             |
72|    received character                                                     |
73\*=========================================================================*/
74
75
76/*=========================================================================*\
77| Function:                                                                 |
78\*-------------------------------------------------------------------------*/
79int termios_printk_open
80
81/*-------------------------------------------------------------------------*\
82| Purpose:                                                                  |
83|    try to open given serial debug port                                    |
84+---------------------------------------------------------------------------+
85| Input Parameters:                                                         |
86\*-------------------------------------------------------------------------*/
87(
88 const char *dev_name, /* name of device to open */
89 unsigned32 baudrate   /* baud rate to use       */
90 );
91/*-------------------------------------------------------------------------*\
92| Return Value:                                                             |
93|    0 on success, -1 and errno otherwise                                   |
94\*=========================================================================*/
95#endif /* _TERMIOS_PRINTK_H */
Note: See TracBrowser for help on using the repository browser.