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####
43 # Author(s): Uwe Kindler
44 # Original data: gthomas
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_IO_CAN {
53 display "CAN device drivers"
59 This option enables drivers for basic I/O services on
63 compile -library=libextras.a can.c
66 puts $::cdl_header "/***** proc output start *****/"
67 puts $::cdl_header "#include <pkgconf/system.h>"
68 puts $::cdl_header "#ifdef CYGDAT_IO_CAN_DEVICE_HEADER"
69 puts $::cdl_header "# include CYGDAT_IO_CAN_DEVICE_HEADER"
70 puts $::cdl_header "#endif "
71 puts $::cdl_header "/****** proc output end ******/"
74 #-----------------------------------------------------------------
76 # A hardware device driver should implement each interface it
79 cdl_interface CYGINT_IO_CAN_TIMESTAMP {
80 display "CAN driver supports timestamps"
83 cdl_interface CYGINT_IO_CAN_STD_CAN_ID {
84 display "11 Bit standard CAN ID support"
87 cdl_interface CYGINT_IO_CAN_EXT_CAN_ID {
88 display "29 Bit extended CAN ID support"
91 cdl_interface CYGINT_IO_CAN_RUNTIME_MBOX_CFG {
92 display "CAN driver supports message box runtime configuration"
95 cdl_interface CYGINT_IO_CAN_REMOTE_BUF {
96 display "CAN driver supports remote response buffers"
99 cdl_interface CYGINT_IO_CAN_AUTOBAUD {
100 display "CAN driver supports automatic baudrate detection"
103 cdl_interface CYGINT_IO_CAN_TX_EVENTS {
104 display "CAN driver supports TX events"
107 #-----------------------------------------------------------------
108 # Each single channel of a CAN chip or on chip CAN module should
109 # implement this interface. It counts the number of available
112 cdl_interface CYGINT_IO_CAN_CHANNELS {
113 display "Number of CAN channels"
117 #-----------------------------------------------------------------
118 # Generic CAN driver configuration
120 cdl_component CYGPKG_IO_CAN_DEVICES {
121 display "Hardware CAN device drivers"
125 This option enables the hardware device drivers
126 for the current platform."
129 cdl_option CYGOPT_IO_CAN_SUPPORT_TIMESTAMP {
130 display "Support CAN event timestamps"
131 requires { CYGINT_IO_CAN_TIMESTAMP > 0 }
132 active_if { CYGINT_IO_CAN_TIMESTAMP > 0 }
135 If the CAN hardware driver supports some kind of timestamps
136 then this option enables propagation of timestamps to higher layers.
137 This may add some extra code to hardware drivers."
140 cdl_option CYGOPT_IO_CAN_TX_EVENT_SUPPORT {
141 display "Support TX events"
142 requires { CYGINT_IO_CAN_TX_EVENTS > 0 }
143 active_if { CYGINT_IO_CAN_TX_EVENTS > 0 }
146 This option enables support for TX events. If a CAN message is
147 transmitted successfully a TX event will be inserted into the
148 receive event queue and propagated to higher layers. If this
149 option is enabled the RX event queue will be filled faster."
152 cdl_option CYGOPT_IO_CAN_STD_CAN_ID {
153 display "11 Bit standard CAN ID support"
154 requires { CYGINT_IO_CAN_STD_CAN_ID > 0 }
155 active_if { CYGINT_IO_CAN_STD_CAN_ID > 0 }
156 default_value { CYGINT_IO_CAN_STD_CAN_ID > 0 ? 1 : 0 }
158 This option enables support for 11 Bit standard CAN identifiers.
159 If the application deals only with 29 Bit extended CAN messages
160 then disabling this option may reduce codesize or increase
164 cdl_option CYGOPT_IO_CAN_EXT_CAN_ID {
165 display "29 Bit extended CAN ID support"
166 requires { CYGINT_IO_CAN_EXT_CAN_ID > 0 }
167 active_if { CYGINT_IO_CAN_EXT_CAN_ID > 0 }
168 default_value { CYGINT_IO_CAN_EXT_CAN_ID > 0 ? 1 : 0 }
170 This option enables support for 29 Bit extended CAN identifiers.
171 If the application deals only with 11 Bit standard CAN messages
172 then disabling this option may reduce codesize or increase
176 cdl_option CYGOPT_IO_CAN_AUTOBAUD {
177 display "Support automatic baudrate detection."
178 requires { CYGINT_IO_CAN_AUTOBAUD > 0 }
179 active_if { CYGINT_IO_CAN_AUTOBAUD > 0 }
182 If the CAN hardware device driver supports any kind of automatic
183 baudrate detection then this option enables support for this feature.
184 If automatic baudrate detection is not required, then disabling this
185 option may reduce codesize."
188 cdl_option CYGOPT_IO_CAN_RUNTIME_MBOX_CFG {
189 display "Message box runtime configuration support"
190 requires { CYGINT_IO_CAN_RUNTIME_MBOX_CFG > 0 }
191 active_if { CYGINT_IO_CAN_RUNTIME_MBOX_CFG > 0 }
194 Message box runtime configuration is required for for hardware message
195 filtering and for hardware remote response buffers. If no hardware
196 filtering is required and if the application does not need remote
197 response buffers this option can be disabled to decrease codesize."
200 cdl_option CYGOPT_IO_CAN_REMOTE_BUF {
201 display "Remote response buffer support"
202 requires { CYGOPT_IO_CAN_RUNTIME_MBOX_CFG }
203 requires { CYGINT_IO_CAN_REMOTE_BUF > 0}
204 active_if { CYGINT_IO_CAN_REMOTE_BUF > 0 }
207 If the driver should handle remote requests automatically then remote
208 response buffers are required. Disabling this option may save some
209 bytes of ROM memory."
212 cdl_option CYGOPT_IO_CAN_SUPPORT_NONBLOCKING {
213 display "Support non-blocking read and write calls"
216 This option enables extra code in the generic CAN driver
217 which allows clients to switch read() and write() call
218 semantics from blocking to non-blocking."
221 cdl_option CYGOPT_IO_CAN_SUPPORT_CALLBACK {
222 display "Support callback on events"
225 This option enables extra code in the generic CAN driver
226 which allows application to register a callback for
227 events. The callback function is called from DSR
228 context so you should be careful to only call API
229 functions that are safe in DSR context."
232 cdl_component CYGOPT_IO_CAN_SUPPORT_TIMEOUTS {
233 display "Support read/write timeouts"
236 active_if CYGPKG_KERNEL
237 requires CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
238 requires CYGOPT_IO_CAN_SUPPORT_NONBLOCKING
240 Read and write operations are blocking calls. If no CAN message
241 arrives for a long time the calling thread remains blocked. If
242 nonblocking calls are enabled but the call should return after
243 a certain amount of time then this option should be enabled."
245 cdl_option CYGNUM_IO_CAN_DEFAULT_TIMEOUT_READ {
246 display "Default read timeout."
250 The initial timeout value in clock ticks for cyg_io_read() calls."
253 cdl_option CYGNUM_IO_CAN_DEFAULT_TIMEOUT_WRITE {
254 display "Default write timeout."
258 The initial timeout value in clock ticks for cyg_io_write() calls."
262 cdl_option CYGBLD_IO_CAN_EXTRA_TESTS {
263 display "Build extra CAN tests"
267 This option enables the building of some extra tests which
268 can be used when testing / debugging CAN drivers. These
269 are not built by default since they do not use the dedicated
270 testing infrastructure. All tests require a properly configured
271 CAN network with a second CAN node that can send and receive
275 <PREFIX>/bin/can_load : <PACKAGE>/tests/can_load.c
276 @sh -c "mkdir -p tests $(dir $@)"
277 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o tests/can_load.o $<
278 @echo $@ ": \\" > $(notdir $@).deps
279 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
280 @tail -n +2 deps.tmp >> $(notdir $@).deps
281 @echo >> $(notdir $@).deps
283 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_load.o
287 <PREFIX>/bin/can_remote : <PACKAGE>/tests/can_remote.c
288 @sh -c "mkdir -p tests $(dir $@)"
289 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o tests/can_remote.o $<
290 @echo $@ ": \\" > $(notdir $@).deps
291 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
292 @tail -n +2 deps.tmp >> $(notdir $@).deps
293 @echo >> $(notdir $@).deps
295 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_remote.o
299 <PREFIX>/bin/can_tx : <PACKAGE>/tests/can_tx.c
300 @sh -c "mkdir -p tests $(dir $@)"
301 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o tests/can_tx.o $<
302 @echo $@ ": \\" > $(notdir $@).deps
303 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
304 @tail -n +2 deps.tmp >> $(notdir $@).deps
305 @echo >> $(notdir $@).deps
307 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_tx.o
311 <PREFIX>/bin/can_filter : <PACKAGE>/tests/can_filter.c
312 @sh -c "mkdir -p tests $(dir $@)"
313 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o tests/can_filter.o $<
314 @echo $@ ": \\" > $(notdir $@).deps
315 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
316 @tail -n +2 deps.tmp >> $(notdir $@).deps
317 @echo >> $(notdir $@).deps
319 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_filter.o
323 <PREFIX>/bin/can_hdi : <PACKAGE>/tests/can_hdi.c
324 @sh -c "mkdir -p tests $(dir $@)"
325 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o tests/can_hdi.o $<
326 @echo $@ ": \\" > $(notdir $@).deps
327 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
328 @tail -n +2 deps.tmp >> $(notdir $@).deps
329 @echo >> $(notdir $@).deps
331 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_hdi.o