1 # ====================================================================
5 # eCos AT91SAM7 CAN module configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2003, 2004 eCosCentric Limited
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.
35 ## -------------------------------------------
36 #####ECOSGPLCOPYRIGHTEND####
37 # ====================================================================
38 ######DESCRIPTIONBEGIN####
40 # Author(s): Uwe Kindler
44 #####DESCRIPTIONEND####
45 # ====================================================================
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
56 This option enables the CAN device drivers for the
58 compile -library=libextras.a can_at91sam7.c
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 *****/"
66 cdl_interface CYGINT_DEVS_CAN_AT91SAM7_CAN_CHANNELS {
67 display "AT91SAM7 CAN Channel"
70 This interface is implemented for each single CAN channnel
71 of an AT91SAM7 chip and counts the number of available
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 } {
80 cdl_interface CYGINT_DEVS_CAN_AT91SAM7_CAN[set ::sam7can] {
81 display "Platform provides CAN [set ::sam7can]"
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."
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"
92 active_if CYGINT_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]
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
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."
103 cdl_option CYGPKG_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_NAME {
104 display "Device name for CAN module [set ::sam7can]"
106 default_value [format {"\"/dev/can%d\""} $::sam7can]
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."
114 cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_KBAUD {
115 display "Default baud rate for CAN module [set ::sam7can]"
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]"
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"
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."
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"
138 legal_values 8 to 128
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."
145 cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_ISR_PRIORITY {
146 display "Interrupt priority"
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."
156 cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_DEFAULT_TX_MBOX {
157 display "Default TX message box"
161 By default one message buffer will be used for message transmission.
162 This option selects one of the 8 CAN message buffers for
166 cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_STD_MBOXES {
167 display "11 Bit standard ID msg. buffers"
169 implements CYGINT_IO_CAN_STD_CAN_ID
172 requires CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_STD_MBOXES + CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_EXT_MBOXES < 8
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."
186 cdl_option CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_EXT_MBOXES {
187 display "29 Bit extended ID msg. buffers"
189 implements CYGINT_IO_CAN_EXT_CAN_ID
192 requires CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_STD_MBOXES + CYGNUM_DEVS_CAN_AT91SAM7_CAN[set ::sam7can]_EXT_MBOXES < 8
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."
208 cdl_option CYGDBG_DEVS_CAN_AT91SAM7_DEBUG {
209 display "Support printing debug information"
212 Check this box to turn ON debug options for AT91SAM7 CAN device driver."