]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/can/arm/at91/at91sam7/v2_0/cdl/can_at91sam7.cdl
Initial revision
[karo-tx-redboot.git] / packages / devs / can / arm / at91 / at91sam7 / v2_0 / cdl / can_at91sam7.cdl
1 # ====================================================================
2 #
3 #      can_at91sam7.cdl
4 #
5 #      eCos AT91SAM7 CAN module configuration data
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2003, 2004 eCosCentric Limited
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 #####ECOSGPLCOPYRIGHTEND####
37 # ====================================================================
38 ######DESCRIPTIONBEGIN####
39 #
40 # Author(s):      Uwe Kindler
41 # Contributors:
42 # Date:           2007-02-10
43 #
44 #####DESCRIPTIONEND####
45 # ====================================================================
46
47
48 cdl_package CYGPKG_DEVS_CAN_AT91SAM7 {
49     display       "Atmel AT91SAM7 CAN device drivers"
50     parent        CYGPKG_IO_CAN_DEVICES
51     active_if     CYGPKG_IO_CAN
52     active_if     CYGPKG_HAL_ARM_AT91SAM7
53     requires      CYGPKG_ERROR
54     include_dir   cyg/io
55     description   "
56            This option enables the CAN device drivers for the
57            Atmel AT91SAM7."
58     compile       -library=libextras.a   can_at91sam7.c
59     define_proc {
60         puts $::cdl_system_header "/***** CAN driver proc output start *****/"
61         puts $::cdl_system_header "#define CYGDAT_IO_CAN_DEVICE_HEADER <pkgconf/devs_can_at91sam7.h>"
62         puts $::cdl_system_header "#define CYGDAT_IO_CAN_DEVICE_INL <cyg/io/can_at91sam7.inl>"
63         puts $::cdl_system_header "/*****  CAN driver proc output end  *****/"
64     }
65
66     cdl_interface CYGINT_DEVS_CAN_AT91SAM7_CAN_CHANNELS {
67         display "AT91SAM7 CAN Channel"
68         flavor bool
69         description "
70                This interface is implemented for each single CAN channnel
71                of an AT91SAM7 chip and counts the number of available 
72                channels."
73     }
74     
75
76     # Support up one on-chip CAN module. The number may vary between
77     # processor variants so it is easy to update this here
78     for { set ::sam7can 0 } { $::sam7can < 1 } { incr ::sam7can } {
79     
80         cdl_interface CYGINT_DEVS_CAN_AT91SAM7_CAN[set ::sam7can] {
81             display     "Platform provides CAN [set ::sam7can]"
82             flavor      bool
83             description "
84                 This interface will be implemented if the specific AT91SAM7
85                 processor being used has on-chip CAN [set ::sam7can], and if
86                 that CAN module is accessible on the target hardware."
87         }
88     
89         cdl_component CYGPKG_DEVS_CAN_AT91SAM7_CAN[set ::sam7can] {
90             display     "Allow access to the on-chip CAN [set ::sam7can] via a CAN driver"
91             flavor      bool
92             active_if       CYGINT_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]
93             default_value   1
94             implements      CYGINT_DEVS_CAN_AT91SAM7_CAN_CHANNELS 
95             implements      CYGINT_IO_CAN_TIMESTAMP       
96             implements      CYGINT_IO_CAN_RUNTIME_MBOX_CFG
97             implements      CYGINT_IO_CAN_REMOTE_BUF  
98             implements      CYGINT_IO_CAN_AUTOBAUD
99             description "
100                 If the application needs to access the on-chip CAN module [set ::sam7can]
101                 via an eCos CAN driver then this option should be enabled."
102
103             cdl_option CYGPKG_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_NAME {
104                 display     "Device name for CAN module [set ::sam7can]"
105                 flavor      data
106                 default_value   [format {"\"/dev/can%d\""} $::sam7can]
107                 description "
108                     This option controls the name that an eCos application
109                     should use to access this device via cyg_io_lookup(),
110                     open(), or similar calls."
111             }
112
113         
114             cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_KBAUD {
115                 display     "Default baud rate for CAN module [set ::sam7can]"
116                 flavor      data
117                 default_value   100
118                 legal_values    { 10 20 50 100 125 250 500 800 1000 "AUTO"}
119                 description "This option determines the initial baud rate in KBaud for 
120                              CAN module [set ::sam7can]"
121             }
122
123             cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_QUEUESIZE_TX {
124                 display     "Size of TX Queue for the CAN module [set ::sam7can] driver"
125                 flavor      data
126                 default_value   8
127                 legal_values    1 to 64
128                 description "
129                     The CAN device driver will run in interrupt mode and will
130                     perform buffering of outgoing data. This option controls the number
131                     of CAN messages the TX queue can store."
132             }
133             
134             cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_QUEUESIZE_RX {
135                 display     "Size of RX Queue for the CAN module [set ::sam7can] driver"
136                 flavor      data
137                 default_value   32
138                 legal_values    8 to 128
139                 description "
140                     The CAN device driver will run in interrupt mode and will
141                     perform buffering of incoming data. This option controls the number
142                     of CAN events the RX queue can store."
143             }
144             
145             cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_ISR_PRIORITY {
146                 display     "Interrupt priority"
147                 flavor      data
148                 default_value 4
149                 legal_values   0 to 7
150                 description "
151                     Interrupt priority CAN module [set ::sam7can]. Each interrupt source 
152                     has a programmable priority level of 0 to 7. Level 7 is the
153                     highest priority and level 0 the lowest."
154             }
155             
156             cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_DEFAULT_TX_MBOX {
157                 display "Default TX message box"
158                 flavor  data
159                 calculated    7
160                 description "
161                     By default one message buffer will be used for message transmission.
162                     This option selects one of the 8 CAN message buffers for
163                     transmission."
164             }
165             
166             cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_STD_MBOXES {
167                 display "11 Bit standard ID msg. buffers"
168                 flavor  booldata
169                 implements CYGINT_IO_CAN_STD_CAN_ID
170                 default_value 3
171                 legal_values  1 to 7
172                 requires CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_STD_MBOXES + CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_EXT_MBOXES < 8
173                 description "
174                     The CAN module provides 8 message buffers. One message buffer
175                     is reserved for message transmission. The remaining 7 buffers are
176                     available for reception of messages. This configuration option
177                     defines the number of message boxes for reception of CAN messages
178                     with standard identifier. This configuration option does not matter
179                     when you configure message filters at runtime. Only if the CAN
180                     modul is configured to receive all available CAN identifiers, 
181                     then this configuration option is important. If you get
182                     RX overrun events, you should raise the number of message boxes or
183                     lower the CAN baud rate."
184             }
185             
186             cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_EXT_MBOXES {
187                 display "29 Bit extended ID msg. buffers"
188                 flavor  booldata
189                 implements CYGINT_IO_CAN_EXT_CAN_ID
190                 default_value 4
191                 legal_values  1 to 7
192                 requires CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_STD_MBOXES + CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_EXT_MBOXES < 8 
193                 description "
194                     The CAN module provides 8 message buffers. One message buffer
195                     is reserved for message transmission. The remaining 7 buffers are
196                     available for reception of messages. This configuration option
197                     defines the number of message boxes for reception of CAN messages
198                     with extended identifier. This configuration option does not matter
199                     when you configure message filters at runtime. Only if the FlexCAN
200                     modul is configured to receive all available CAN identifiers, 
201                     then this configuration option is important. If you get
202                     RX overrun events, you should raise the number of message boxes or
203                     lower the CAN baud rate."
204             }
205         }    
206     }
207        
208     cdl_option CYGDBG_DEVS_CAN_AT91SAM7_DEBUG {
209         display "Support printing debug information"
210             default_value 0
211             description "
212                 Check this box to turn ON debug options for AT91SAM7 CAN device driver."
213     }    
214 }