1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# usbs.cdl
|
4 |
|
|
#
|
5 |
|
|
# USB slave-side support
|
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, 2010 Free Software Foundation, 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
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
## for more details.
|
22 |
|
|
##
|
23 |
|
|
## You should have received a copy of the GNU General Public License
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
# ====================================================================
|
40 |
|
|
######DESCRIPTIONBEGIN####
|
41 |
|
|
#
|
42 |
|
|
# Author(s): bartv
|
43 |
|
|
# Original data: bartv
|
44 |
|
|
# Contributors:
|
45 |
|
|
# Date: 2000-10-04
|
46 |
|
|
#
|
47 |
|
|
#####DESCRIPTIONEND####
|
48 |
|
|
#
|
49 |
|
|
# ====================================================================
|
50 |
|
|
|
51 |
|
|
cdl_package CYGPKG_IO_USB_SLAVE {
|
52 |
|
|
display "USB slave-side support"
|
53 |
|
|
parent CYGPKG_IO_USB
|
54 |
|
|
include_dir "cyg/io/usb"
|
55 |
|
|
active_if CYGHWR_IO_USB_SLAVE
|
56 |
|
|
doc ref/io-usb-slave.html
|
57 |
|
|
|
58 |
|
|
compile usbs.c
|
59 |
|
|
|
60 |
|
|
cdl_interface CYGINT_IO_USB_SLAVE_CLIENTS {
|
61 |
|
|
display "Number of clients of USB devices"
|
62 |
|
|
description "
|
63 |
|
|
This counter keeps track of the number of clients of
|
64 |
|
|
USB devices, especially application-class packages such
|
65 |
|
|
as the USB-ethernet support. It can be used by USB
|
66 |
|
|
device drivers for default settings.
|
67 |
|
|
"
|
68 |
|
|
}
|
69 |
|
|
|
70 |
|
|
cdl_option CYGGLO_IO_USB_SLAVE_APPLICATION {
|
71 |
|
|
display "Application code uses USB devices"
|
72 |
|
|
default_value 0
|
73 |
|
|
implements CYGINT_IO_USB_SLAVE_CLIENTS
|
74 |
|
|
description "
|
75 |
|
|
If the USB devices are accessed by application code
|
76 |
|
|
rather than by other packages then enabling this
|
77 |
|
|
option will cause the USB device drivers to be enabled.
|
78 |
|
|
"
|
79 |
|
|
}
|
80 |
|
|
|
81 |
|
|
cdl_option CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES {
|
82 |
|
|
display "Provide devtab entries by default"
|
83 |
|
|
default_value CYGPKG_IO
|
84 |
|
|
requires CYGPKG_IO
|
85 |
|
|
description "
|
86 |
|
|
The USB slave-side endpoints can typically be accessed in two
|
87 |
|
|
different ways. There is support for the traditional way of
|
88 |
|
|
doing I/O with open/read/write calls, which involves the
|
89 |
|
|
use of devtab entries. It is also possible to use a
|
90 |
|
|
USB-specific API, defined largely in terms of asynchronous
|
91 |
|
|
operations and callbacks (the read/write implementation uses
|
92 |
|
|
these lower-level calls). If neither the application nor
|
93 |
|
|
any other USB-related packages require the higher-level
|
94 |
|
|
read/write calls then it is possible to save some memory
|
95 |
|
|
by eliminating the devtab entries.
|
96 |
|
|
"
|
97 |
|
|
}
|
98 |
|
|
|
99 |
|
|
cdl_interface CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS {
|
100 |
|
|
display "Number of available host->slave endpoints"
|
101 |
|
|
}
|
102 |
|
|
cdl_interface CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS {
|
103 |
|
|
display "Number of available slave->host endpoints"
|
104 |
|
|
}
|
105 |
|
|
|
106 |
|
|
cdl_option CYGBLD_IO_USB_SLAVE_USBTEST {
|
107 |
|
|
display "Build the main USB test program"
|
108 |
|
|
doc ref/usbs-testing.html
|
109 |
|
|
description "
|
110 |
|
|
The USB slave-side software is supplied with host-side
|
111 |
|
|
and target-side software that allows a variety of testing
|
112 |
|
|
to be performed. The slave-side software is not built
|
113 |
|
|
by default since it can only operate in specific environments
|
114 |
|
|
and in conjunction with the host-side software. Enabling
|
115 |
|
|
this option causes the slave-side software to be added
|
116 |
|
|
to the list of test cases for the current configuration."
|
117 |
|
|
default_value 0
|
118 |
|
|
implements CYGINT_IO_USB_SLAVE_CLIENTS
|
119 |
|
|
requires { is_substr(CYGPKG_IO_USB_SLAVE_TESTS, " tests/usbtarget") }
|
120 |
|
|
|
121 |
|
|
requires CYGFUN_KERNEL_API_C CYGFUN_KERNEL_THREADS_TIMER !CYGINT_KNEREL_SCHEDULER_UNIQUE_PRIORITIES
|
122 |
|
|
requires CYGPKG_LIBC_STDIO CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS
|
123 |
|
|
}
|
124 |
|
|
|
125 |
|
|
cdl_option CYGPKG_IO_USB_SLAVE_TESTS {
|
126 |
|
|
display "USB slave tests"
|
127 |
|
|
flavor data
|
128 |
|
|
no_define
|
129 |
|
|
default_value { "" }
|
130 |
|
|
description "This option specifies the set of tests to be
|
131 |
|
|
built for the USB slave package"
|
132 |
|
|
}
|
133 |
|
|
}
|