OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [io-package-intro.html] - Blame information for rev 375

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>Introduction</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="I/O Package (Device Drivers)"
23
HREF="io.html"><LINK
24
REL="PREVIOUS"
25
TITLE="I/O Package (Device Drivers)"
26
HREF="io.html"><LINK
27
REL="NEXT"
28
TITLE="User API"
29
HREF="io-user-api.html"></HEAD
30
><BODY
31
CLASS="CHAPTER"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="io.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
></TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="io-user-api.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="CHAPTER"
82
><H1
83
><A
84
NAME="IO-PACKAGE-INTRO">Chapter 14. Introduction</H1
85
><P
86
>The I/O package is designed as a general purpose framework for
87
supporting device drivers. This includes all classes of
88
drivers from simple serial to networking stacks and beyond.</P
89
><P
90
>Components of the I/O package, such as device drivers, are
91
configured into the system just like all other components.
92
Additionally, end users may add their own drivers to this set.</P
93
><P
94
>While the set of drivers (and the devices they represent) may be
95
considered static, they must be accessed via an opaque
96
&#8220;handle&#8221;. Each device in the system has a unique name and
97
the <TT
98
CLASS="FUNCTION"
99
>cyg_io_lookup()</TT
100
> function is used to map that
101
name onto the handle for the device. This &#8220;hiding&#8221; of the
102
device implementation allows for generic, named devices, as well as
103
more flexibility. Also, the <TT
104
CLASS="FUNCTION"
105
>cyg_io_lookup()</TT
106
>
107
function provides drivers the opportunity to initialize the device
108
when usage actually starts.</P
109
><P
110
>All devices have a name. The standard provided devices use names such
111
as <TT
112
CLASS="FILENAME"
113
>&#8220;/dev/console&#8221;</TT
114
> and
115
<TT
116
CLASS="FILENAME"
117
>&#8220;/dev/serial0&#8221;</TT
118
>, where the
119
<TT
120
CLASS="FILENAME"
121
>&#8220;/dev/&#8221;</TT
122
> prefix indicates that this is
123
the name of a device.</P
124
><P
125
>The entire I/O package API, as well as the standard
126
set of provided drivers, is written in C. </P
127
><P
128
>Basic functions are provided to send data to and receive data
129
from a device. The details of how this is done is left to the device [class] itself.
130
For example, writing data to a block device like a disk drive may
131
have different semantics than writing to a serial port. </P
132
><P
133
>Additional functions are provided to manipulate the state
134
of the driver and/or the actual device. These functions
135
are, by design, quite specific to the actual driver. </P
136
><P
137
>This driver model supports layering; in other words, a device
138
may actually be created &#8220;on top of&#8221; another device.
139
For example, the &#8220;tty&#8221; (terminal-like) devices are
140
built on top of simple serial devices. The upper layer then has
141
the flexibility to add features and functions not found at the lower
142
layers. In this case the &#8220;tty&#8221; device provides
143
for line buffering and editing not available from the simple serial
144
drivers.</P
145
><P
146
>Some drivers will support visibility of the layers they depend
147
upon. The &#8220;tty&#8221; driver allows information about
148
the actual serial device to be manipulated by passing get/set
149
config calls that use a serial driver &#8220;key&#8221; down
150
to the serial driver itself. </P
151
></DIV
152
><DIV
153
CLASS="NAVFOOTER"
154
><HR
155
ALIGN="LEFT"
156
WIDTH="100%"><TABLE
157
SUMMARY="Footer navigation table"
158
WIDTH="100%"
159
BORDER="0"
160
CELLPADDING="0"
161
CELLSPACING="0"
162
><TR
163
><TD
164
WIDTH="33%"
165
ALIGN="left"
166
VALIGN="top"
167
><A
168
HREF="io.html"
169
ACCESSKEY="P"
170
>Prev</A
171
></TD
172
><TD
173
WIDTH="34%"
174
ALIGN="center"
175
VALIGN="top"
176
><A
177
HREF="ecos-ref.html"
178
ACCESSKEY="H"
179
>Home</A
180
></TD
181
><TD
182
WIDTH="33%"
183
ALIGN="right"
184
VALIGN="top"
185
><A
186
HREF="io-user-api.html"
187
ACCESSKEY="N"
188
>Next</A
189
></TD
190
></TR
191
><TR
192
><TD
193
WIDTH="33%"
194
ALIGN="left"
195
VALIGN="top"
196
>I/O Package (Device Drivers)</TD
197
><TD
198
WIDTH="34%"
199
ALIGN="center"
200
VALIGN="top"
201
><A
202
HREF="io.html"
203
ACCESSKEY="U"
204
>Up</A
205
></TD
206
><TD
207
WIDTH="33%"
208
ALIGN="right"
209
VALIGN="top"
210
>User API</TD
211
></TR
212
></TABLE
213
></DIV
214
></BODY
215
></HTML
216
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.