1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
# ====================================================================
#
# usbs_at91.cdl
#
# USB device driver for the ATMEL AT91 family of processors.
#
# ====================================================================
## ####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 2006, 2010 Free Software Foundation, Inc.
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later
## version.
##
## eCos is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
## for more details.
##
## You should have received a copy of the GNU General Public License
## along with eCos; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## As a special exception, if other files instantiate templates or use
## macros or inline functions from this file, or you compile this file
## and link it with other works to produce a work based on this file,
## this file does not by itself cause the resulting work to be covered by
## the GNU General Public License. However the source code for this file
## must still be made available in accordance with section (3) of the GNU
## General Public License v2.
##
## This exception does not invalidate any other reasons why a work based
## on this file might be covered by the GNU General Public License.
## -------------------------------------------
## ####ECOSGPLCOPYRIGHTEND####
# ====================================================================
######DESCRIPTIONBEGIN####
#
# Author(s): Oliver Munz, Andrew Lunn
# Original data: bartv
# Contributors: ccoutand
# Date: 2006-02-25
#
#####DESCRIPTIONEND####
# ====================================================================
cdl_package CYGPKG_DEVS_USB_AT91 {
display "Atmel AT91 USB Device Driver"
include_dir "cyg/io/usb"
parent CYGPKG_IO_USB
implements CYGHWR_IO_USB_SLAVE
cdl_interface CYGINT_DEVS_USB_AT91_HAS_USB {
description "
This interface is implemented by HALs for devices which have
the USB hardware."
}
description "
This package provides a suitable eCos device driver
for AT91 USB.
In this version the driver will support the AT91SAM7S.
Other AT92 devices may work, but have not been tested.
The Driver needs 48, 96 or 192MHz plus minus 0.25%.
Buffers are allocated only in the higher level. There
is no need to configure the endpoints in this CDL, because
they will be configured dynamical at the set_configuration
call from the host...
The endpoints 1..3 can be configured as bulk or interrupt
IN or OUT endpoint. Isochronous transfer is not supported."
cdl_component CYGFUN_DEVS_USB_AT91_EP0 {
display "Support the control endpoint 0"
flavor bool
default_value CYGINT_IO_USB_SLAVE_CLIENTS
requires CYGPKG_IO_USB CYGPKG_IO_USB_SLAVE
requires {
((CYGNUM_HAL_ARM_AT91_CLOCK_SPEED < 48120000 &&
CYGNUM_HAL_ARM_AT91_CLOCK_SPEED > 47880000) ||
(CYGNUM_HAL_ARM_AT91_CLOCK_SPEED < 96240000 &&
CYGNUM_HAL_ARM_AT91_CLOCK_SPEED > 95760000))
}
active_if CYGINT_DEVS_USB_AT91_HAS_USB
implements CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS
implements CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS
compile usbs_at91.c
compile -library=libextras.a usbs_at91_data.cxx
description "
Enable support for endpoint 0. If this support is disabled
then the entire USB port is unusable."
cdl_option CYGDAT_DEVS_USB_AT91_GPIO_SET_PULLUP_INTERNAL {
display "The chip has internal pullup"
flavor bool
calculated { CYGHWR_HAL_ARM_AT91SAM7SE }
requires { CYGDAT_DEVS_USB_AT91_GPIO_SET_PULLUP_PIN == "NONE" }
description "
The chip has an internal pullup resistor;
the use of this pullup is mandatory (?), so there
should be no external pullup resistor."
}
cdl_option CYGDAT_DEVS_USB_AT91_GPIO_SET_PULLUP_PIN {
display "PIO-Pin who controls the pullup resistor"
flavor data
default_value { "AT91_GPIO_PA16" }
description "
Every GPIO pin is able to do it. If you don't need
a pin because your HW has the pullup fixed wired
then select NONE"
}
cdl_option CYGNUM_DEVS_USB_AT91_GPIO_SET_PULLUP_INVERTED {
display "Has the signal to be inverted?"
active_if {CYGDAT_DEVS_USB_AT91_GPIO_SET_PULLUP_PIN != "NONE"}
flavor bool
default_value 1
description "
This option indicates that the pullup pin should
be inverted. ie VDD is active, VCC is inactive. For the
AT91SAM7SEK it needs to be inverted, hence this default."
}
cdl_option CYGDAT_DEVS_USB_AT91_GPIO_READ_POWER_PIN {
display "PIO-Pin who see the USB-Power"
flavor data
default_value { "AT91_GPIO_PA13"}
description "
Every GPIO pin is able to do it. If you don't need
a pin then select NONE"
}
cdl_option CYGNUM_DEVS_USB_AT91_GPIO_READ_POWER_INVERTED {
display "Has the signal to be inverted?"
flavor bool
default_value 0
description "
This option indicates that the power detect pin should
be inverted. ie VDD is active, VCC is inactive."
}
cdl_option CYGSEM_DEVS_USB_AT91_ZERO_LENGTH_PACKET_TERMINATION {
display "Allow USB driver to end data transfer with an empty data packet."
flavor bool
default_value 1
description "
This option allows the USB driver to automatically signal the
end of a data transmission with an empty packet, if the last packet
fragment is equal to the endpoint buffer size."
}
}
cdl_component CYGPKG_DEVS_USB_AT91_DEVTAB_ENTRIES {
display "Provide a devtab entry for endpoints"
active_if CYGFUN_DEVS_USB_AT91_EP0
default_value 0
description "
This component controls if /dev/usb entries will be created."
cdl_option CYGVAR_DEVS_USB_AT91_EP0_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 0"
flavor bool
default_value 0
requires CYGPKG_IO
description "
If endpoint 0 will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and ioctl calls then a devtab entry is needed."
}
cdl_option CYGVAR_DEVS_USB_AT91_EP1_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 1"
flavor bool
default_value 1
requires CYGPKG_IO
description "
If this endpoint will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and read calls then a devtab entry is needed."
}
cdl_option CYGVAR_DEVS_USB_AT91_EP2_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 2"
flavor bool
default_value 1
requires CYGPKG_IO
description "
If this endpoint will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and read calls then a devtab entry is needed."
}
cdl_option CYGVAR_DEVS_USB_AT91_EP3_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 3"
flavor bool
default_value 1
requires CYGPKG_IO
description "
If this endpoint will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and read calls then a devtab entry is needed."
}
cdl_option CYGVAR_DEVS_USB_AT91_EP4_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 4"
flavor bool
default_value 0
requires CYGPKG_IO
description "
If this endpoint will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and read calls then a devtab entry is needed."
}
cdl_option CYGVAR_DEVS_USB_AT91_EP5_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 5"
flavor bool
default_value 0
requires CYGPKG_IO
description "
If this endpoint will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and read calls then a devtab entry is needed."
}
cdl_option CYGVAR_DEVS_USB_AT91_EP6_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 6"
flavor bool
default_value 0
requires CYGPKG_IO
description "
If this endpoint will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and read calls then a devtab entry is needed."
}
cdl_option CYGVAR_DEVS_USB_AT91_EP7_DEVTAB_ENTRY {
display "Provide a devtab entry for endpoint 7"
flavor bool
default_value 0
requires CYGPKG_IO
description "
If this endpoint will only be accessed via the low-level
USB-specific calls then there is no need for an entry
in the device table, saving some memory. If the
application intends to access the endpoint by means
of open and read calls then a devtab entry is needed."
}
cdl_option CYGDAT_DEVS_USB_AT91_DEVTAB_BASENAME {
display "Base name for devtab entries"
flavor data
default_value { "\"/dev/usbs\"" }
description "
If the uAT91 USB device driver package provides devtab
entries for any of the endpoints then this option gives
control over the names of these entries. By default the
endpoints will be called \"/dev/usbs0c\", \"/dev/usbs3w\"
and \"/dev/usbs4r\" (assuming all three endpoints are
enabled. The common part \"/dev/usbs\" is determined
by this configuration option. It may be necessary to
change this if there are multiple USB slave-side
devices on the target hardware to prevent a name clash."
}
}
}
|