FreeCalypso > hg > fc-magnetite
annotate src/gpf2/inc/dio.h @ 392:30203d5aeb74
components/*: -DCHIPSET=$CHIPSET instead of fixed -DCHIPSET=10
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 17 Jan 2018 20:30:28 +0000 |
parents | 864b8cc0cf63 |
children |
rev | line source |
---|---|
1
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Copyright 2004 Texas Instruments Berlin, AG |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | All rights reserved. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | This file is confidential and a trade secret of Texas |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | Instruments Berlin, AG |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | The receipt of or possession of this file does not convey |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | any rights to reproduce or disclose its contents or to |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | manufacture, use, or sell anything it may describe, in |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | whole, or in part, without the specific written consent of |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | Texas Instruments Berlin, AG. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 +----------------------------------------------------------------------------- |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | Purpose : General definitions of DIO driver interface |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 +----------------------------------------------------------------------------- |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 #ifndef __DIO_H__ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #define __DIO_H__ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /*==== INCLUDES =============================================================*/ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #include "gdi.h" |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 /*==== DEFINITIONS ==========================================================*/ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 * Device Type |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #define DIO_DATA_SER 0x00800000 /* device can transfer serial data */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #define DIO_DATA_PKT 0x00400000 /* device can transfer packet data */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #define DIO_DATA_MUX 0x00200000 /* device can start a multiplexer */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #define DIO_TYPE_ID 0x0000FF00 /* id to separate different capabilities */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #define DIO_TYPE_SER (DIO_DATA_SER | 0x00000100) /* serial device */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #define DIO_TYPE_SER_MUX (DIO_DATA_SER | DIO_DATA_MUX | 0x00000100) /* mux device */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #define DIO_TYPE_PKT (DIO_DATA_PKT | 0x00000100) /* packet device */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 * Device Flags |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #define DIO_FLAG_SLEEP 0x80000000 /* sleep state allowed */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 * Baud rates |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #define DIO_BAUD_921600 0x00800000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #define DIO_BAUD_812500 0x00400000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #define DIO_BAUD_460800 0x00200000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 #define DIO_BAUD_406250 0x00100000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #define DIO_BAUD_230400 0x00080000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #define DIO_BAUD_203125 0x00040000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #define DIO_BAUD_115200 0x00020000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #define DIO_BAUD_57600 0x00010000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #define DIO_BAUD_38400 0x00008000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #define DIO_BAUD_33900 0x00004000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #define DIO_BAUD_28800 0x00002000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #define DIO_BAUD_19200 0x00001000 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 #define DIO_BAUD_14400 0x00000800 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 #define DIO_BAUD_9600 0x00000400 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #define DIO_BAUD_7200 0x00000200 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #define DIO_BAUD_4800 0x00000100 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #define DIO_BAUD_2400 0x00000080 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #define DIO_BAUD_1200 0x00000040 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 #define DIO_BAUD_600 0x00000020 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 #define DIO_BAUD_300 0x00000010 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 #define DIO_BAUD_150 0x00000008 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 #define DIO_BAUD_110 0x00000004 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 #define DIO_BAUD_75 0x00000002 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 #define DIO_BAUD_AUTO 0x00000001 /* automatic baud rate detection */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 * Character framing |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 #define DIO_CF_7N1 0x00000800 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #define DIO_CF_7S1 0x00000400 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #define DIO_CF_7M1 0x00000200 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 #define DIO_CF_7E1 0x00000100 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #define DIO_CF_7O1 0x00000080 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #define DIO_CF_7N2 0x00000040 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #define DIO_CF_8N1 0x00000020 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #define DIO_CF_8S1 0x00000010 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 #define DIO_CF_8M1 0x00000008 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #define DIO_CF_8E1 0x00000004 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 #define DIO_CF_8O1 0x00000002 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #define DIO_CF_8N2 0x00000001 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 * Types of flow control |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 #define DIO_FLOW_XTR_CTS 0x00000800 /* TX= transp. XON/XOFF RX=CTS */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #define DIO_FLOW_XTR_XOFF 0x00000400 /* TX= transp. XON/XOFF RX=XON/XOFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 #define DIO_FLOW_XTR_NO 0x00000200 /* TX= transp. XON/XOFF RX=OFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 #define DIO_FLOW_RTS_CTS 0x00000100 /* TX=RTS RX=CTS */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 #define DIO_FLOW_RTS_XOFF 0x00000080 /* TX=RTS RX=XON/XOFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 #define DIO_FLOW_RTS_NO 0x00000040 /* TX=RTS RX=OFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 #define DIO_FLOW_XON_CTS 0x00000020 /* TX=XON/XOFF RX=CTS */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 #define DIO_FLOW_XON_XOFF 0x00000010 /* TX=XON/XOFF RX=XON/XOFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 #define DIO_FLOW_XON_NO 0x00000008 /* TX=XON/XOFF RX=OFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 #define DIO_FLOW_NO_CTS 0x00000004 /* TX=OFF RX=CTS */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 #define DIO_FLOW_NO_XOFF 0x00000002 /* TX=OFF RX=XON/XOFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 #define DIO_FLOW_NONE 0x00000001 /* TX=OFF RX=OFF */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 * Serial device flags |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 #define DIO_FLAG_SER_ESC 0x80000000 /* device supports esc seq detection */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 * MUX mode |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 #define DIO_MUX_I 0x00000008 /* advanced option with I frames */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #define DIO_MUX_UI 0x00000004 /* advanced option with UI frames */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 #define DIO_MUX_UIH 0x00000002 /* advanced option with UIH frames */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 #define DIO_MUX_BASIC 0x00000001 /* basic option */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 * Sleep Mode |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 #define DIO_SLEEP_ENABLE 0x01 /* enter sleep mode if possible */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 #define DIO_SLEEP_DISABLE 0x02 /* do not enter sleep mode */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 * Special Guard Period |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 #define DIO_ESC_OFF 0x0000 /* turn escape sequence detection off */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 * Device Mode |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 #define DIO_MODE_MUX 0x00000002 /* acts as 27.010 multiplexer device */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 #define DIO_MODE_SER 0x00000001 /* acts as serial device */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 * Control Type |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 #define DIO_CTRL_LINES 0x0001 /* associated structure is T_DIO_CTRL_LINES */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 #define DIO_CTRL_MUX 0x0002 /* associated structure is T_DIO_CTRL_MUX */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 * Line State definition & control structure. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 #define DIO_SA 0x80000000 /* state: read=DTR write-DSR */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 #define DIO_SB 0x40000000 /* state: read=RTS write=DCD */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 #define DIO_X 0x20000000 /* state: read=RTS write=CTS */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 #define DIO_RING 0x10000000 /* state: ring indicator */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 #define DIO_ESC 0x08000000 /* state: escape sequence detested. */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 #define DIO_MUX_STOPPED 0x04000000 /* multiplexer stopped */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 #define DIO_BRK 0x02000000 /* state: break received/to be sent */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 #define DIO_BRKLEN 0x000000FF /* state: break signal # of characters */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 /*==== TYPES ================================================================*/ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 * Device Capabilities |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 U32 device_type; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 U32 device_flags; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 U16 mtu_control; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 U16 mtu_data; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 char const *driver_name; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 } T_DIO_CAP; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 U32 device_type; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 U32 device_flags; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 U16 mtu_control; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 U16 mtu_data; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 char const *driver_name; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 U32 baudrate_auto; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 U32 baudrate_fixed; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 U32 char_frame; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 U32 flow_control; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 U32 ser_flags; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 } T_DIO_CAP_SER; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 U32 device_type; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 U32 device_flags; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 U16 mtu_control; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 U16 mtu_data; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 char const *driver_name; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 U32 baudrate_auto; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 U32 baudrate_fixed; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 U32 char_frame; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 U32 flow_control; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 U32 ser_flags; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 U32 mux_mode; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 } T_DIO_CAP_SER_MUX; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 U32 device_type; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 U32 device_flags; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 U16 mtu_control; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 U16 mtu_data; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 char const *driver_name; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 } T_DIO_CAP_PKT; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 * Device Control Block |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 U32 device_type; /*< 0: 4> device identifier with general capability information */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 U8 sleep_mode; /*< 4: 1> enter sleep mode is possible or not */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 U8 _align0; /*< 5: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 U8 _align1; /*< 6: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 U8 _align2; /*< 7: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 } T_DIO_DCB; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 U32 device_type; /*< 0: 4> device identifier with general capability information */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 U8 sleep_mode; /*< 4: 1> enter sleep mode is possible or not */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 U8 _align0; /*< 5: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 U8 _align1; /*< 6: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 U8 _align2; /*< 7: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 U32 baudrate; /*< 8: 4> user set baudrate */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 U32 char_frame; /*< 12: 4> supported character framing */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 U32 flow_control; /*< 16: 4> supported modes of flow control */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 U8 xon; /*< 20: 1> set/reset XON for flow control */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 U8 xoff; /*< 21: 1> set/reset XOFF for flow control */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 U8 esc_char; /*< 22: 1> ASCII character which is used in an escape sequence */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 U8 _align3; /*< 23: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 U16 guard_period; /*< 24: 2> duration value for escape sequence */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 U8 _align4; /*< 26: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 U8 _align5; /*< 27: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 } T_DIO_DCB_SER; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 U32 device_type; /*< 0: 4> device identifier with general capability information */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 U8 sleep_mode; /*< 4: 1> enter sleep mode is possible or not */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 U8 _align0; /*< 5: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 U8 _align1; /*< 6: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 U8 _align2; /*< 7: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 U32 baudrate; /*< 8: 4> user set baudrate */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 U32 char_frame; /*< 12: 4> supported character framing */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 U32 flow_control; /*< 16: 4> supported modes of flow control */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 U8 xon; /*< 20: 1> set/reset XON for flow control */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 U8 xoff; /*< 21: 1> set/reset XOFF for flow control */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 U8 esc_char; /*< 22: 1> ASCII character which is used in an escape sequence */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 U8 _align3; /*< 23: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 U16 guard_period; /*< 24: 2> duration value for escape sequence */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 U8 _align4; /*< 26: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 U8 _align5; /*< 27: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 U32 device_mode; /*< 28: 4> work mode of device */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 U32 mux_mode; /*< 32: 4> supported multiplexer modes */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 U16 n1; /*< 36: 2> max frame size of mux frame */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 U8 n2; /*< 38: 1> max number of retransmissions */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 U8 t1; /*< 39: 1> acknowledgement timer */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 U8 t2; /*< 40: 1> response timer */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 U8 t3; /*< 41: 1> wake up response timer */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 U8 k; /*< 42: 1> windows size */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 U8 _align6; /*< 43: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 } T_DIO_DCB_SER_MUX; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 U32 device_type; /*< 0: 4> device identifier with general capability information */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 U8 sleep_mode; /*< 4: 1> enter sleep mode is possible or not */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 U8 _align0; /*< 5: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 U8 _align1; /*< 6: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 U8 _align2; /*< 7: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 } T_DIO_DCB_PKT; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 * Data Control |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 U16 control_type ; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 U16 length ; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 }T_DIO_CTRL ; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 U16 control_type; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 U16 length; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 U32 state; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 } T_DIO_CTRL_LINES; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 U16 control_type ; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 U16 length ; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 U32 state; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 }T_DIO_CTRL_MUX ; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 * DIO Data format. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 U8 _align0; /*< 0: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 U8 _align1; /*< 1: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 U16 c_data; /*< 2: 2> counter */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 U8 *ptr_data; /*< 4: 4> pointer to pointer to the first byte of the data buffer segment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 } T_dio_segment; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 typedef struct |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 { |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 U16 length; /*< 0: 2> len of dio_ctrl */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 U8 _align0; /*< 2: 1> alignment */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 U8 c_dio_segment; /*< 3: 1> counter */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 T_dio_segment *ptr_dio_segment; /*< 4: 4> pointer to Structured Element */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 } T_dio_buffer; |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 /*==== PROTOTYPES ===========================================================*/ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 | Function : dio_init |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 | Description : The function initializes the interface and the drivers. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 | Parameters : none |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 | Return : DRV_OK - Initialization successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 | DRV_INITIALIZED - Interface already initialized |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 | DRV_INITFAILURE - Initialization failed |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 extern U16 dio_init(void); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 | Function : dio_user_init |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 | Description : The function sets the signal callback of a DIO user. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 | Parameters : user_name - DIO user name |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 | drv_handle - unique handle for this user |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 | signal_callback - callback function for this user |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 | Return : DRV_OK - Callback successfully set |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 | DRV_INVALID_PARAMS - The specified user does not exist |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 | DRV_INTERNAL_ERROR - Internal error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 | DRV_NOTCONFIGURED - DIO interface is not yet initialized. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 extern U16 dio_user_init(char const * user_name, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 U16 drv_handle, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 T_DRV_CB_FUNC signal_callback); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 | Function : dio_user_exit |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 | Description : Termination of User Operation. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 | Parameters : user_name - DIO user name |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 | Return : DRV_OK - User operation successfully terminated. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 | DRV_INVALID_PARAMS - User operation can not be terminated yet. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 | DRV_INTERNAL_ERROR - Internal error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 extern U16 dio_user_exit(char const * user_name); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 | Function : dio_exit |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 | Description : Termination of the Interface. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 | Parameters : none |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 | Return : none |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 extern void dio_exit(void); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 | Function : dio_set_rx_buffer |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 | Description : This function provides a receive buffer to the driver. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 | buffer - buffer to copy received data in it |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 | DRV_BUFFER_FULL - Buffer queue full. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 | DRV_INVALID_PARAMS - The specified device does not exist or |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 | the data buffer is not big enough. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 | DRV_NOTCONFIGURED - The device is not yet configured |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 extern U16 dio_set_rx_buffer(U32 device, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 T_dio_buffer * buffer); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 | Function : dio_read |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 | Description : This function returns a receive buffer and control information. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 | control_info - control information from the driver |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 | buffer - buffer with received data in it |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 | DRV_INVALID_PARAMS - The specified device does not exist |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 | DRV_NOTCONFIGURED - The device is not yet configured |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 extern U16 dio_read(U32 device, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 T_DIO_CTRL * control_info, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 T_dio_buffer ** buffer); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 | Function : dio_write |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 | Description : This function provides a send buffer to the driver which |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 | contains data to send. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 | control_info - control information for the driver |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 | buffer - buffer with data to send |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 | DRV_BUFFER_FULL - Buffer queue full. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 | DRV_INVALID_PARAMS - The specified device does not exist or |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 | the data buffer to big. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 | DRV_NOTCONFIGURED - The device is not yet configured |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 extern U16 dio_write(U32 device, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 T_DIO_CTRL * control_info, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 T_dio_buffer * buffer); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 | Function : dio_get_tx_buffer |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 | Description : This function returns a send buffer provided via dio_write(). |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 | buffer - return sent data buffer |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 | DRV_INVALID_PARAMS - The specified device does not exist |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 | DRV_NOTCONFIGURED - The device is not yet configured |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 extern U16 dio_get_tx_buffer(U32 device, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 T_dio_buffer ** buffer); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 | Function : dio_clear |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 | Description : This function is used to clear the hardware send buffer. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 | DRV_INVALID_PARAMS - The specified device does not exist |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 | DRV_NOTCONFIGURED - The device is not yet configured |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 | DRV_INPROCESS - The driver is busy clearing the buffer |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 extern U16 dio_clear(U32 device); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 | Function : dio_flush |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 | Description : With this function the driver is requested to inform the |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 | user, when data of the hardware send buffer have been written |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 | successfully. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 | DRV_INVALID_PARAMS - The specified device does not exist |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 | DRV_NOTCONFIGURED - The device is not yet configured |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 | DRV_INPROCESS - The driver is busy flushing the buffer |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 extern U16 dio_flush(U32 device); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 | Function : dio_get_capabilities |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 | Description : This function is used to retrieve the capabilities of a device. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 | capabilities - Return: Pointer to the device capabilities |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 | DRV_INVALID_PARAMS - The specified device does not exist |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 extern U16 dio_get_capabilities(U32 device, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 T_DIO_CAP ** capabilities); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 | Function : dio_set_config |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 | Description : This function is used to configure a device. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 | dcb - pointer to a device control block |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 | DRV_INVALID_PARAMS - parameter invalid or out of range |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 extern U16 dio_set_config(U32 device, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 T_DIO_DCB * dcb); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 | Function : dio_get_config |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 | Description : This function reads the device configuration. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 | dcb - pointer to a device control block |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 | DRV_INVALID_PARAMS - The specified device does not exist or |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 | wrong Device Control Block provided. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 | DRV_NOTCONFIGURED - The device is not yet configured |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 extern U16 dio_get_config(U32 device, |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 T_DIO_DCB * dcb); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 /* |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 | Function : dio_close_device |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 | Description : This function is used to close a device. |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 | Parameters : device - device number |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 | Return : DRV_OK - Function successful |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 | DRV_INVALID_PARAMS - The specified device can not be closed yet |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 | DRV_INTERNAL_ERROR - Internal driver error |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 | |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 +------------------------------------------------------------------------------ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 */ |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 extern U16 dio_close_device(U32 device); |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 |
864b8cc0cf63
src/gpf2: preened GPF goo from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 #endif /* __DIO_H__ */ |