source: rtems/c/src/libchip/serial/serial.h @ 4cd4c5a

4.104.114.84.95
Last change on this file since 4cd4c5a was 58b1e95, checked in by Joel Sherrill <joel.sherrill@…>, on 06/22/98 at 10:34:34

Corrected spacing

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2 *  This file contains the TTY driver table definition
3 *
4 *  This driver uses the termios pseudo driver.
5 *
6 *  COPYRIGHT (c) 1998 by Radstone Technology
7 *
8 *
9 * THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
10 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
11 * IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
12 * AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
13 *
14 * You are hereby granted permission to use, copy, modify, and distribute
15 * this file, provided that this notice, plus the above copyright notice
16 * and disclaimer, appears in all copies. Radstone Technology will provide
17 * no support for this code.
18 *
19 *  $Id$
20 */
21
22#ifndef __LIBCHIP_SERIAL_h
23#define __LIBCHIP_SERIAL_h
24
25#include <ringbuf.h>
26
27typedef struct _console_fns {
28  boolean (*deviceProbe)(int minor);
29  int     (*deviceFirstOpen)(int major, int minor, void *arg);
30  int     (*deviceLastClose)(int major, int minor, void *arg);
31  int     (*deviceRead)(int minor);
32  int     (*deviceWrite)(int minor, const char *buf, int len);
33  void    (*deviceInitialize)(int minor);
34  void    (*deviceWritePolled)(int minor, char cChar);
35  int       deviceOutputUsesInterrupts;
36} console_fns;
37
38typedef struct _console_flow {
39  int (*deviceStopRemoteTx)(int minor);
40  int (*deviceStartRemoteTx)(int minor);
41} console_flow;
42
43typedef struct _console_tbl {
44  char          *sDeviceName;
45  console_fns   *pDeviceFns;
46  boolean      (*deviceProbe)(int minor);
47  console_flow  *pDeviceFlow;
48  unsigned32     ulMargin;
49  unsigned32     ulHysteresis;
50  void          *pDeviceParams;
51  unsigned32     ulCtrlPort1;
52  unsigned32     ulCtrlPort2;
53  unsigned32     ulDataPort;
54  unsigned8    (*getRegister)(unsigned32 port, unsigned8 register);
55  void         (*setRegister)(unsigned32 port, unsigned8 reg, unsigned8 value);
56  unsigned8    (*getData)(unsigned32 port);
57  void         (*setData)(unsigned32 port, unsigned8 value);
58  unsigned32     ulClock;
59  unsigned int   ulIntVector;
60} console_tbl;
61
62typedef struct _console_data {
63  void                   *termios_data;
64  volatile boolean        bActive;
65  volatile Ring_buffer_t  TxBuffer;
66  /*
67   * This field may be used for any purpose required by the driver
68   */
69  void                   *pDeviceContext;
70} console_data;
71
72extern console_tbl  Console_Port_Tbl[];
73extern console_data Console_Port_Data[];
74extern unsigned long  Console_Port_Count;
75
76#endif
77/* end of include file */
Note: See TracBrowser for help on using the repository browser.