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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [io/] [serial/] [current/] [cdl/] [io_serial.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      io_serial.cdl
4
#
5
#      eCos IO configuration data
6
#
7
# ====================================================================
8
## ####ECOSGPLCOPYRIGHTBEGIN####
9
## -------------------------------------------
10
## This file is part of eCos, the Embedded Configurable Operating System.
11
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
12
##
13
## eCos is free software; you can redistribute it and/or modify it under
14
## the terms of the GNU General Public License as published by the Free
15
## Software Foundation; either version 2 or (at your option) any later
16
## version.
17
##
18
## eCos is distributed in the hope that it will be useful, but WITHOUT
19
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21
## for more details.
22
##
23
## You should have received a copy of the GNU General Public License
24
## along with eCos; if not, write to the Free Software Foundation, Inc.,
25
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26
##
27
## As a special exception, if other files instantiate templates or use
28
## macros or inline functions from this file, or you compile this file
29
## and link it with other works to produce a work based on this file,
30
## this file does not by itself cause the resulting work to be covered by
31
## the GNU General Public License. However the source code for this file
32
## must still be made available in accordance with section (3) of the GNU
33
## General Public License v2.
34
##
35
## This exception does not invalidate any other reasons why a work based
36
## on this file might be covered by the GNU General Public License.
37
## -------------------------------------------
38
## ####ECOSGPLCOPYRIGHTEND####
39
# ====================================================================
40
######DESCRIPTIONBEGIN####
41
#
42
# Author(s):      jskov
43
# Original data:  gthomas
44
# Contributors:
45
# Date:           1999-07-07
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_IO_SERIAL {
52
    display       "Serial device drivers"
53
    parent        CYGPKG_IO
54
    active_if     CYGPKG_IO
55
    requires      CYGPKG_ERROR
56
    include_dir   cyg/io
57
    description   "
58
        This option enables drivers for basic I/O services on
59
        serial devices."
60
    doc           ref/io.html
61
 
62
    compile       -library=libextras.a common/serial.c
63
 
64
    define_proc {
65
        puts $::cdl_header "/***** proc output start *****/"
66
        puts $::cdl_header "#include "
67
        puts $::cdl_header "#ifdef CYGDAT_IO_SERIAL_DEVICE_HEADER"
68
        puts $::cdl_header "# include CYGDAT_IO_SERIAL_DEVICE_HEADER"
69
        puts $::cdl_header "#endif "
70
        puts $::cdl_header "/****** proc output end ******/"
71
    }
72
 
73
    cdl_option CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING {
74
        display       "Support non-blocking read and write calls"
75
        default_value 0
76
        description   "
77
            This option enables extra code in the generic serial driver
78
            which allows clients to switch read() and write() call
79
            semantics from blocking to non-blocking."
80
    }
81
 
82
    cdl_interface CYGINT_IO_SERIAL_BLOCK_TRANSFER {
83
        display       "Driver requires block transfer callback functions"
84
        description   "
85
            Some low-level drivers can be optimized to transfer blocks
86
            of data instead of a single character at a time. These usually
87
            rely on a hardware FIFO of some sort."
88
    }
89
 
90
    cdl_interface CYGINT_IO_SERIAL_LINE_STATUS_HW {
91
        display "Serial driver supports line status"
92
    }
93
 
94
    cdl_option CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS {
95
        display       "Support line status callbacks"
96
        requires      { CYGINT_IO_SERIAL_LINE_STATUS_HW > 0 }
97
        default_value { 0 != CYGINT_IO_SERIAL_LINE_STATUS_HW }
98
        description "
99
            This option indicates that if the serial driver supports it,
100
            serial line status and modem status information should be
101
            propagated to higher layers via callbacks."
102
    }
103
 
104
    cdl_component CYGPKG_IO_SERIAL_FLOW_CONTROL {
105
        display           "Flow control"
106
        description       "
107
                This component contains options related to flow control."
108
        flavor            bool
109
        requires          (CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE || \
110
                           CYGOPT_IO_SERIAL_FLOW_CONTROL_HW)
111
        default_value     0
112
 
113
        cdl_component CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE {
114
                display       "Software flow control"
115
                default_value 1
116
                description   "
117
                        This component enables support of software flow control."
118
 
119
                cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR {
120
                    display       "Start character"
121
                    flavor        data
122
                    default_value 17
123
                    legal_values  0 to 255
124
                    description   "
125
                        This option specifies the ascii character used to
126
                        indicate that transmission should start."
127
                }
128
 
129
                cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR {
130
                    display       "Stop character"
131
                    flavor        data
132
                    default_value 19
133
                    legal_values  0 to 255
134
                    description   "
135
                        This option specifies the ascii character used to
136
                        indicate that transmission should stop."
137
                }
138
        }
139
 
140
        cdl_option CYGOPT_IO_SERIAL_FLOW_CONTROL_HW {
141
                display       "Hardware flow control"
142
                active_if     { CYGINT_IO_SERIAL_FLOW_CONTROL_HW > 0 }
143
                requires      { CYGINT_IO_SERIAL_FLOW_CONTROL_HW > 0 }
144
                requires      CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
145
                default_value { CYGINT_IO_SERIAL_FLOW_CONTROL_HW > 0 ? \
146
                                CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS : 0 }
147
                description   "
148
                        If the hardware supports it, this option allows hardware
149
                        flow control to be enabled. This may be in the form of
150
                        either or both of RTS/CTS, or DSR/DTR flow control."
151
        }
152
 
153
        cdl_interface CYGINT_IO_SERIAL_FLOW_CONTROL_HW {
154
                display "Serial h/w supports hardware flow control"
155
        }
156
 
157
        cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT {
158
                display       "Default flow control method"
159
                flavor        data
160
                legal_values  { "NONE" "XONXOFF" "RTSCTS" "DSRDTR" }
161
                default_value { "NONE" }
162
                description   "This option allows a default flow control method
163
                               to be defined. Combinations of flow control methods
164
                               may also be set, but this is only possible by
165
                               using the cyg_io_set_config() API in source code."
166
        }
167
 
168
        cdl_option CYGNUM_IO_SERIAL_FLOW_CONTROL_LOW_WATER_PERCENT {
169
                display       "Rx flow control low water mark"
170
                flavor        data
171
                legal_values  1 to 100
172
                default_value 33
173
                description   "This sets the water mark used for determining
174
                               when to disable flow control, expressed
175
                               as a percentage of the buffer size. When the
176
                               receive buffer size is lower than this percentage,
177
                               if the transmitter had previously been throttled, it
178
                               will now be informed it can restart."
179
        }
180
 
181
        cdl_option CYGNUM_IO_SERIAL_FLOW_CONTROL_HIGH_WATER_PERCENT {
182
                display       "Rx flow control high water mark"
183
                flavor        data
184
                legal_values  1 to 100
185
                default_value 66
186
                requires      { CYGNUM_IO_SERIAL_FLOW_CONTROL_HIGH_WATER_PERCENT >= \
187
                                CYGNUM_IO_SERIAL_FLOW_CONTROL_LOW_WATER_PERCENT }
188
                description   "This sets the water mark used for determining
189
                               when to enable flow control, expressed
190
                               as a percentage of the buffer size. When the
191
                               receive buffer size exceeds this percentage,
192
                               signals are sent to the transmitter to tell it
193
                               to throttle tranmission."
194
        }
195
 
196
    }
197
 
198
    cdl_component CYGPKG_IO_SERIAL_TTY {
199
        display       "TTY-mode serial device drivers"
200
        flavor        bool
201
        default_value 1
202
        description   "
203
            This option enables a simple terminal-like device driver
204
            that can be used for serial devices that interact with humans,
205
            such as a system console."
206
 
207
        script        tty.cdl
208
        compile       -library=libextras.a common/tty.c
209
    }
210
 
211
    cdl_component CYGPKG_IO_SERIAL_TERMIOS {
212
        display       "Termios compatible TTY drivers"
213
        flavor        bool
214
        requires      CYGPKG_ISOINFRA
215
        requires      CYGPKG_IO_FILEIO
216
        requires      CYGINT_ISO_ERRNO_CODES
217
        requires      CYGINT_ISO_ERRNO
218
        requires      CYGINT_ISO_MALLOC
219
        default_value { 0 != CYGPKG_ISOINFRA && 0 != CYGPKG_IO_FILEIO && \
220
 
221
 
222
        implements    CYGINT_ISO_TERMIOS
223
        description   "
224
            This option enables terminal drivers compatible with
225
            POSIX termios."
226
 
227
        script        termios.cdl
228
        compile       common/termios.c
229
    }
230
 
231
    cdl_component CYGPKG_IO_SERIAL_DEVICES {
232
        display       "Hardware serial device drivers"
233
        flavor        bool
234
        default_value 0
235
        description   "
236
            This option enables the hardware device drivers
237
            for the current platform."
238
    }
239
 
240
    cdl_option CYGBLD_IO_SERIAL_EXTRA_TESTS {
241
        display "Build extra serial tests"
242
        default_value 0
243
        no_define
244
        description "
245
            This option enables the building of some extra tests which
246
            can be used when testing / debugging serial drivers. These
247
            are not built by default since they do not use the dedicated
248
            testing infrastructure."
249
 
250
        make -priority 320 {
251
            /bin/serial_echo : /tests/serial_echo.c
252
            @sh -c "mkdir -p tests $(dir $@)"
253
            $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o tests/serial_echo.o $<
254
            @echo $@ ": \\" > $(notdir $@).deps
255
            @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
256
            @tail -n +2 deps.tmp >> $(notdir $@).deps
257
            @echo >> $(notdir $@).deps
258
            @rm deps.tmp
259
            $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/serial_echo.o
260
        }
261
    }
262
 
263
    cdl_component CYGPKG_IO_SERIAL_OPTIONS {
264
        display "Serial device driver build options"
265
        flavor  none
266
        description   "
267
            Package specific build options including control over
268
            compiler flags used only in building this package,
269
            and details of which tests are built."
270
 
271
 
272
        cdl_option CYGPKG_IO_SERIAL_CFLAGS_ADD {
273
            display "Additional compiler flags"
274
            flavor  data
275
            no_define
276
            default_value { "" }
277
            description   "
278
                This option modifies the set of compiler flags for
279
                building the serial device drivers. These flags are used in addition
280
                to the set of global flags."
281
        }
282
 
283
        cdl_option CYGPKG_IO_SERIAL_CFLAGS_REMOVE {
284
            display "Suppressed compiler flags"
285
            flavor  data
286
            no_define
287
            default_value { "" }
288
            description   "
289
                This option modifies the set of compiler flags for
290
                building the serial device drivers. These flags are removed from
291
                the set of global flags if present."
292
        }
293
 
294
        cdl_option CYGPKG_IO_SERIAL_TESTS {
295
            display "Serial device driver tests"
296
            flavor  data
297
            no_define
298
            calculated { CYGPKG_IO_SERIAL_DEVICES ? "tests/serial1 tests/serial2 tests/serial3 tests/serial4 tests/serial5 tests/tty1 tests/tty2 tests/flow1 tests/flow2" : "" }
299
            description   "
300
                This option specifies the set of tests for the serial device drivers."
301
        }
302
    }
303
 
304
    cdl_option CYGPKG_IO_SERIAL_SELECT_SUPPORT {
305
        display "Enable serial device select support"
306
        flavor bool
307
        active_if CYGPKG_IO_FILEIO
308
        requires  { CYGFUN_IO_FILEIO_SELECT == 1 }
309
        default_value 1
310
        description "
311
            This option enables support for the select() API function on all
312
            serial devices."
313
    }
314
 
315
    # These could be regular define_proc outputs, but keeping them as
316
    # CDL interfaces allow us to possibly skip building/running some
317
    # tests.
318
    cdl_component CYGPKG_IO_SERIAL_TEST_SPECS {
319
        display "Serial testing specification"
320
        flavor     bool
321
        calculated 1
322
        no_define
323
 
324
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_9600 {
325
            display "Skip 9600 baud testing"
326
        }
327
 
328
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_14400 {
329
            display "Skip 14400 baud testing"
330
        }
331
 
332
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_19200 {
333
            display "Skip 19200 baud testing"
334
        }
335
 
336
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_38400 {
337
            display "Skip 38400 baud testing"
338
        }
339
 
340
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_57600 {
341
            display "Skip 57600 baud testing"
342
        }
343
 
344
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_115200 {
345
            display "Skip 115200 baud testing"
346
        }
347
 
348
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN {
349
            display "Skip even-parity testing"
350
        }
351
 
352
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_PARITY_ODD {
353
            display "Skip odd-parity testing"
354
        }
355
 
356
        cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_STOP_2 {
357
            display "Skip 2-stop bit testing"
358
        }
359
    }
360
}
361
 
362
# EOF io_serial.cdl

powered by: WebSVN 2.1.0

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