1 # ====================================================================
5 # eCos IO configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
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 version.
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
44 # Original data: gthomas
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_IO_SERIAL {
53 display "Serial device drivers"
58 This option enables drivers for basic I/O services on
62 compile -library=libextras.a common/serial.c
65 puts $::cdl_header "/***** proc output start *****/"
66 puts $::cdl_header "#include <pkgconf/system.h>"
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 ******/"
73 cdl_option CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING {
74 display "Support non-blocking read and write calls"
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."
82 cdl_interface CYGINT_IO_SERIAL_BLOCK_TRANSFER {
83 display "Driver requires block transfer callback functions"
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."
90 cdl_interface CYGINT_IO_SERIAL_LINE_STATUS_HW {
91 display "Serial driver supports line status"
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 }
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."
104 cdl_component CYGPKG_IO_SERIAL_FLOW_CONTROL {
105 display "Flow control"
107 This component contains options related to flow control."
109 requires (CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE || \
110 CYGOPT_IO_SERIAL_FLOW_CONTROL_HW)
113 cdl_component CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE {
114 display "Software flow control"
117 This component enables support of software flow control."
119 cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_XON_CHAR {
120 display "Start character"
123 legal_values 0 to 255
125 This option specifies the ascii character used to
126 indicate that transmission should start."
129 cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_XOFF_CHAR {
130 display "Stop character"
133 legal_values 0 to 255
135 This option specifies the ascii character used to
136 indicate that transmission should stop."
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 }
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."
153 cdl_interface CYGINT_IO_SERIAL_FLOW_CONTROL_HW {
154 display "Serial h/w supports hardware flow control"
157 cdl_option CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT {
158 display "Default flow control method"
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."
168 cdl_option CYGNUM_IO_SERIAL_FLOW_CONTROL_LOW_WATER_PERCENT {
169 display "Rx flow control low water mark"
171 legal_values 1 to 100
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."
181 cdl_option CYGNUM_IO_SERIAL_FLOW_CONTROL_HIGH_WATER_PERCENT {
182 display "Rx flow control high water mark"
184 legal_values 1 to 100
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."
198 cdl_component CYGPKG_IO_SERIAL_TTY {
199 display "TTY-mode serial device drivers"
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."
208 compile -library=libextras.a common/tty.c
211 cdl_component CYGPKG_IO_SERIAL_TERMIOS {
212 display "Termios compatible TTY drivers"
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 0 != CYGINT_ISO_ERRNO_CODES && \
221 0 != CYGINT_ISO_ERRNO }
222 implements CYGINT_ISO_TERMIOS
224 This option enables terminal drivers compatible with
228 compile common/termios.c
231 cdl_component CYGPKG_IO_SERIAL_DEVICES {
232 display "Hardware serial device drivers"
236 This option enables the hardware device drivers
237 for the current platform."
240 cdl_option CYGBLD_IO_SERIAL_EXTRA_TESTS {
241 display "Build extra serial tests"
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."
251 <PREFIX>/bin/serial_echo : <PACKAGE>/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
259 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/serial_echo.o
263 cdl_component CYGPKG_IO_SERIAL_OPTIONS {
264 display "Serial device driver build options"
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."
272 cdl_option CYGPKG_IO_SERIAL_CFLAGS_ADD {
273 display "Additional compiler flags"
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."
283 cdl_option CYGPKG_IO_SERIAL_CFLAGS_REMOVE {
284 display "Suppressed compiler flags"
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."
294 cdl_option CYGPKG_IO_SERIAL_TESTS {
295 display "Serial device driver tests"
298 calculated { CYGPKG_IO_SERIAL_DEVICES ? "tests/serial1 tests/serial2 tests/serial3 tests/serial4 tests/serial5 tests/tty1 tests/tty2 tests/flow1 tests/flow2" : "" }
300 This option specifies the set of tests for the serial device drivers."
304 cdl_option CYGPKG_IO_SERIAL_SELECT_SUPPORT {
305 display "Enable serial device select support"
307 active_if CYGPKG_IO_FILEIO
308 requires { CYGFUN_IO_FILEIO_SELECT == 1 }
311 This option enables support for the select() API function on all
315 # These could be regular define_proc outputs, but keeping them as
316 # CDL interfaces allow us to possibly skip building/running some
318 cdl_component CYGPKG_IO_SERIAL_TEST_SPECS {
319 display "Serial testing specification"
324 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_9600 {
325 display "Skip 9600 baud testing"
328 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_14400 {
329 display "Skip 14400 baud testing"
332 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_19200 {
333 display "Skip 19200 baud testing"
336 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_38400 {
337 display "Skip 38400 baud testing"
340 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_57600 {
341 display "Skip 57600 baud testing"
344 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_115200 {
345 display "Skip 115200 baud testing"
348 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN {
349 display "Skip even-parity testing"
352 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_PARITY_ODD {
353 display "Skip odd-parity testing"
356 cdl_interface CYGINT_IO_SERIAL_TEST_SKIP_STOP_2 {
357 display "Skip 2-stop bit testing"