]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/io/can/v2_0/cdl/io_can.cdl
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / io / can / v2_0 / cdl / io_can.cdl
1 # ====================================================================
2 #
3 #      io_can.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 Red Hat, 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 version.
16 ##
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
20 ## for more details.
21 ##
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.
25 ##
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.
32 ##
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.
35 ##
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####
42 #
43 # Author(s):      Uwe Kindler
44 # Original data:  gthomas
45 # Contributors:
46 # Date:           2005-05-17
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_IO_CAN {
53     display       "CAN device drivers"
54     parent        CYGPKG_IO
55     active_if     CYGPKG_IO
56     requires      CYGPKG_ERROR
57     include_dir   cyg/io
58     description   "
59         This option enables drivers for basic I/O services on
60         CAN devices."
61     doc           ref/io.html
62
63     compile       -library=libextras.a can.c
64  
65     define_proc {
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 ******/"
72     }
73     
74     #-----------------------------------------------------------------
75     # Interfaces
76     # A hardware device driver should implement each interface it
77     # supports
78     #
79     cdl_interface CYGINT_IO_CAN_TIMESTAMP {
80         display "CAN driver supports timestamps"
81     }
82     
83     cdl_interface CYGINT_IO_CAN_STD_CAN_ID {
84         display "11 Bit standard CAN ID support"
85     }
86     
87     cdl_interface CYGINT_IO_CAN_EXT_CAN_ID {
88         display "29 Bit extended CAN ID support"
89     }
90     
91     cdl_interface CYGINT_IO_CAN_RUNTIME_MBOX_CFG {
92         display "CAN driver supports message box runtime configuration"
93     }
94     
95     cdl_interface CYGINT_IO_CAN_REMOTE_BUF {
96         display "CAN driver supports remote response buffers"
97     }
98     
99     cdl_interface CYGINT_IO_CAN_AUTOBAUD {
100         display "CAN driver supports automatic baudrate detection"
101     }
102     
103     cdl_interface CYGINT_IO_CAN_TX_EVENTS {
104         display "CAN driver supports TX events"
105     }
106     
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
110     # CAN channels
111     #
112     cdl_interface CYGINT_IO_CAN_CHANNELS {
113         display "Number of CAN channels"
114     }
115     
116     
117     #-----------------------------------------------------------------
118     # Generic CAN driver configuration
119     #
120     cdl_component CYGPKG_IO_CAN_DEVICES {
121         display       "Hardware CAN device drivers"
122         flavor        bool
123         default_value 1
124         description   "
125             This option enables the hardware device drivers
126                 for the current platform."
127     }
128     
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 }
133         default_value 0
134         description "
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."
138     }
139     
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 }
144         default_value 0
145         description "
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."
150     }
151     
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 }
157         description "
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
161                performance."
162     }
163     
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 }
169         description "
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
173                performance."
174     }
175     
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 }
180         default_value 0
181         description "
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."
186     }
187     
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 }
192         default_value 1
193         description "
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."
198     }
199     
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 }
205         default_value 1
206         description "
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."
210     }
211         
212     cdl_option CYGOPT_IO_CAN_SUPPORT_NONBLOCKING {
213         display       "Support non-blocking read and write calls"
214         default_value 0
215         description   "
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."
219     }
220
221     cdl_option CYGOPT_IO_CAN_SUPPORT_CALLBACK {
222         display       "Support callback on events"
223         default_value 0
224         description   "
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."
230     }
231
232     cdl_component CYGOPT_IO_CAN_SUPPORT_TIMEOUTS {
233         display       "Support read/write timeouts"
234         flavor        bool
235         default_value 0
236         active_if     CYGPKG_KERNEL
237         requires      CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
238         requires      CYGOPT_IO_CAN_SUPPORT_NONBLOCKING
239         description   "
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."
244              
245         cdl_option CYGNUM_IO_CAN_DEFAULT_TIMEOUT_READ {
246             display "Default read timeout."
247             flavor  data
248             default_value 100
249             description   "
250                 The initial timeout value in clock ticks for cyg_io_read() calls."
251         }
252         
253         cdl_option CYGNUM_IO_CAN_DEFAULT_TIMEOUT_WRITE {
254             display "Default write timeout."
255             flavor  data
256             default_value 100
257             description   "
258                 The initial timeout value in clock ticks for cyg_io_write() calls."
259         }
260     }
261     
262     cdl_option CYGBLD_IO_CAN_EXTRA_TESTS {
263         display "Build extra CAN tests"
264         default_value 0
265         no_define
266         description "
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
272             CAN messages."
273     
274         make -priority 320 {
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
282             @rm deps.tmp
283             $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_load.o
284         }
285         
286         make -priority 320 {
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
294             @rm deps.tmp
295             $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_remote.o
296         }
297                 
298         make -priority 320 {
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
306             @rm deps.tmp
307             $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_tx.o
308         }
309         
310         make -priority 320 {
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
318             @rm deps.tmp
319             $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_filter.o
320         }
321         
322         make -priority 320 {
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
330             @rm deps.tmp
331             $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ tests/can_hdi.o
332         }
333     }
334 }
335
336 # EOF io_can.cdl