1 # ====================================================================
5 # USB slave-side serial package.
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
12 ## eCos is free software; you can redistribute it and/or modify it under
13 ## the terms of the GNU General Public License as published by the Free
14 ## Software Foundation; either version 2 or (at your option) any later version.
16 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 ## You should have received a copy of the GNU General Public License along
22 ## with eCos; if not, write to the Free Software Foundation, Inc.,
23 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 ## As a special exception, if other files instantiate templates or use macros
26 ## or inline functions from this file, or you compile this file and link it
27 ## with other works to produce a work based on this file, this file does not
28 ## by itself cause the resulting work to be covered by the GNU General Public
29 ## License. However the source code for this file must still be made available
30 ## in accordance with section (3) of the GNU General Public License.
32 ## This exception does not invalidate any other reasons why a work based on
33 ## this file might be covered by the GNU General Public License.
35 ## -------------------------------------------
36 #####ECOSGPLCOPYRIGHTEND####
37 # ====================================================================
38 ######DESCRIPTIONBEGIN####
40 # Author(s): Frank M. Pagliughi (fmp), SoRo Systems, Inc.
44 #####DESCRIPTIONEND####
45 # ====================================================================
47 cdl_package CYGPKG_IO_USB_SLAVE_SERIAL {
48 display "USB slave serial support"
49 include_dir "cyg/io/usb"
50 parent CYGPKG_IO_USB_SLAVE
51 requires { CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS >= 1 }
52 requires { CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS >= 1 }
54 implements CYGINT_IO_USB_SLAVE_CLIENTS
55 # doc ref/io-usb-slave-eth.html
58 The USB slave serial package supports the development of USB
59 peripherals which mimic a serial connection to the host
60 machine. Such a device creates a relatively simple upgrade to
61 USB from a legacy serial connection, especially from the
62 perspective of the host software and device drivers."
64 cdl_option CYGDAT_IO_USB_SLAVE_CLASS_TYPE {
65 display "Serial USB Class"
67 default_value { "ACM" }
68 legal_values { "ACM" "generic" }
70 The USB serial module can enumerate as either a generic
71 (vendor-specific) usb device or a communications class ACM
72 device. The generic device requires a pair of Bulk
73 endpoints, while the ACM device also requires an Interrupt
74 IN endpoint. For a Windows host, the ACM configuration is
75 required to use the standard 'usbser.sys' device driver,
76 but for a Linux host, the generic configuration works, and
77 saves the additional endpoint."
79 cdl_option CYGDAT_IO_USB_SLAVE_SERIAL_EP0 {
80 display "Name of EP0 structure"
82 default_value { "usbs_at91_ep0" }
84 The name of the variable that contains the endpoint 0
85 structure. This should be set to the EP0 structure for
86 the desired USB device driver such as usbs_at91_ep0,
89 cdl_option CYGNUM_IO_USB_SLAVE_SERIAL_EP0_MAX_PACKET_SIZE {
90 display "The size of EP0"
93 legal_values { 8 16 64 }
95 The size of the EP0 hardware buffer on the specific USB
98 cdl_option CYGNUM_IO_USB_SLAVE_SERIAL_TX_EP_NUM {
99 display "Tx (USB IN) endpoint number"
103 The endpoint that should be used for the device-side
104 transmitter, which is the USB IN direction."
106 cdl_option CYGDAT_IO_USB_SLAVE_SERIAL_TX_EP {
107 display "The Tx (USB IN) endpoint structure"
109 default_value { "usbs_at91_ep1" }
111 The endpoint structure that corresponds to the selected
112 Tx endpoint number. This is dependent on the USBS device
113 driver selected, and could be usbs_at91_ep1,
114 usbs_sa11x0_ep1, etc"
117 cdl_option CYGNUM_IO_USB_SLAVE_SERIAL_RX_EP_NUM {
118 display "Rx (USB OUT) endpoint number"
122 The endpoint that should be used for the device-side
123 receiver, which is the USB OUT direction."
125 cdl_option CYGDAT_IO_USB_SLAVE_SERIAL_RX_EP {
126 display "The Rx (USB OUT) endpoint structure"
128 default_value { "usbs_at91_ep2" }
130 The endpoint structure that corresponds to the selected
131 Rx endpoint number. This is dependent on the USBS device
132 driver selected, and could be usbs_at91_ep2,
133 usbs_sa11x0_ep2, etc"
135 cdl_option CYGNUM_IO_USB_SLAVE_SERIAL_INTR_EP_NUM {
136 display "Interrupt IN endpoint number"
139 active_if { CYGDAT_IO_USB_SLAVE_CLASS_TYPE == "ACM" }
141 The endpoint that should be used for the ACM Interrupt IN"
143 cdl_option CYGDAT_IO_USB_SLAVE_SERIAL_INTR_EP {
144 display "Interrupt IN endpoint structure"
146 default_value { "usbs_at91_ep3" }
147 active_if { CYGDAT_IO_USB_SLAVE_CLASS_TYPE == "ACM" }
149 The endpoint structure that corresponds to the selected ACM
150 Interrupt IN endpoint."
152 cdl_option CYGNUM_IO_USB_SLAVE_SERIAL_VENDOR_ID {
153 display "USB Forum Vendor ID"
156 legal_values 1 to 0xFFFF
158 Each USB vendor has an Vendor ID allocated to it by the
159 USB-IF organization. Any arbitrary value can be selected
160 for testing provided that it doesn't conflict with devices
161 on the development host, but a device should NEVER be
162 released publicly without a valid Vendor ID"
165 cdl_option CYGNUM_IO_USB_SLAVE_SERIAL_PRODUCT_ID {
166 display "USB product ID"
169 legal_values 1 to 0xFFFF
171 You are free to select an arbitrary 16-bit Product ID for
172 a device. The combination of Vendor ID and Product ID
173 uniquely identified a USB device."
175 cdl_option CYGDAT_IO_USB_SLAVE_SERIAL_MFG_STR {
176 display "The Device Vendor's Name (Manufacturer String)"
178 default_value { "\"eCos\"" }
180 The standard USB enumeration allows for a
181 manufacturer's name which is normally reported to the
182 user when the device is first plugged into the host."
184 cdl_option CYGDAT_IO_USB_SLAVE_SERIAL_PRODUCT_STR {
185 display "The Device Product Name"
187 default_value { "\"eCos USB Serial Device\"" }
189 The standard USB enumeration allows for a product name
190 which is normally reported to the user when the device
191 is first plugged into the host."
194 cdl_option CYGBLD_IO_USB_SLAVE_SERIAL_DEBUG {
195 display "Enable debug output from the driver"
199 The driver may produce debug output which can be
200 useful to work out why it is not working as expected."
203 cdl_component CYGPKG_IO_USB_SLAVE_SERIAL_OPTIONS {
204 display "Build options"
208 Package-specific build options including control over compiler
209 flags used only in building this package."
211 cdl_option CYGPKG_IO_USB_SLAVE_SERIAL_CFLAGS_ADD {
212 display "Additional compiler flags"
217 This option modifies the set of compiler flags for
218 building this package. These flags are used in addition
219 to the set of global flags."
222 cdl_option CYGPKG_IO_USB_SLAVE_SERIAL_CFLAGS_REMOVE {
223 display "Suppressed compiler flags"
228 This option modifies the set of compiler flags for
229 building this package. These flags are removed from
230 the set of global flags if present."
234 cdl_component CYGBLD_IO_USB_SLAVE_SERIAL_EXAMPLES {
235 display "Build example programs"
237 requires { CYGPKG_IO_FILEIO }
238 requires { CYGPKG_IO_SERIAL_DEVICES }
240 Enabling this option will cause the example programs
241 to be built using the normal test case infrastructure.
242 They are however not test cases and should not be used
243 with any automatic test farm running all the
244 tests. Hence this option is disabled by default."
246 cdl_option CYGPKG_IO_USB_SLAVE_SERIAL_TESTS {
247 display "USBS serial example/test programs"
250 calculated { "tests/usbserial_echo.c tests/usb2serial.c" }
252 usbserial_echo will echo charactors received
253 over the usb serial port back to the sender.
254 usb2serial acts as a bridge between a USB serial
255 slave and a real serial port. It is hard coded to use