source: rtems/c/src/libchip/serial/serial.h @ 9eef52b

4.104.114.84.95
Last change on this file since 9eef52b was 8a2d4f2b, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 23, 1998 at 2:54:09 PM

Added NULL entry for setAttributes.

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[ee3b242b]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
[36152b0e]27/*
28 *  Types for get and set register routines
29 */
30
31typedef unsigned8 (*getRegister_f)(unsigned32 port, unsigned8 register);
32typedef void      (*setRegister_f)(
33                            unsigned32 port, unsigned8 reg, unsigned8 value);
34typedef unsigned8 (*getData_f)(unsigned32 port);
35typedef void      (*setData_f)(unsigned32 port, unsigned8 value);
36
[ee3b242b]37typedef struct _console_fns {
[424e23ee]38  boolean (*deviceProbe)(int minor);
[58b1e95]39  int     (*deviceFirstOpen)(int major, int minor, void *arg);
40  int     (*deviceLastClose)(int major, int minor, void *arg);
41  int     (*deviceRead)(int minor);
42  int     (*deviceWrite)(int minor, const char *buf, int len);
43  void    (*deviceInitialize)(int minor);
44  void    (*deviceWritePolled)(int minor, char cChar);
[8a2d4f2b]45  int     (*deviceSetAttributes)(int minor, const struct termios *t);
[58b1e95]46  int       deviceOutputUsesInterrupts;
[ee3b242b]47} console_fns;
48
49typedef struct _console_flow {
[424e23ee]50  int (*deviceStopRemoteTx)(int minor);
51  int (*deviceStartRemoteTx)(int minor);
[ee3b242b]52} console_flow;
53
54typedef struct _console_tbl {
[58b1e95]55  char          *sDeviceName;
56  console_fns   *pDeviceFns;
57  boolean      (*deviceProbe)(int minor);
[424e23ee]58  console_flow  *pDeviceFlow;
[58b1e95]59  unsigned32     ulMargin;
60  unsigned32     ulHysteresis;
61  void          *pDeviceParams;
62  unsigned32     ulCtrlPort1;
63  unsigned32     ulCtrlPort2;
64  unsigned32     ulDataPort;
[36152b0e]65  getRegister_f  getRegister;
66  setRegister_f  setRegister;
67  getData_f      getData;
68  setData_f      setData;
[58b1e95]69  unsigned32     ulClock;
70  unsigned int   ulIntVector;
[ee3b242b]71} console_tbl;
72
73typedef struct _console_data {
[58b1e95]74  void                   *termios_data;
75  volatile boolean        bActive;
[424e23ee]76  volatile Ring_buffer_t  TxBuffer;
77  /*
78   * This field may be used for any purpose required by the driver
79   */
[58b1e95]80  void                   *pDeviceContext;
[ee3b242b]81} console_data;
82
[424e23ee]83extern console_tbl  Console_Port_Tbl[];
84extern console_data Console_Port_Data[];
85extern unsigned long  Console_Port_Count;
[ee3b242b]86
87#endif
88/* end of include file */
Note: See TracBrowser for help on using the repository browser.