Code Confidencebuild 3.0.0.201402161939

Configuration

Name

Configuration -- Configuration USB Serial like Peripherals

Configuration

The package requires a few basic configurations plus optionally some additional configuration options.

The driver needs two or three endpoints, depending if ACM communications or a more generic model is used. This is configured with CYGDAT_IO_USB_SLAVE_CLASS_TYPE which can take the value ACM or generic.

The CYGDAT_IO_USB_SLAVE_SERIAL_EP0 must be configured with the control end point of the USB device. When using static endpoint configuration, CYGPKG_IO_USB_SLAVE_SERIAL_STATIC_EP must be enabled, CYGDAT_IO_USB_SLAVE_SERIAL_TX_EP must be configured with the endpoint to be used for transmission and CYGDAT_IO_USB_SLAVE_SERIAL_RX_EP must be configured with the end point used for reception. Associated with these are CYGNUM_IO_USB_SLAVE_SERIAL_RX_EP_NUM and CYGNUM_IO_USB_SLAVE_SERIAL_TX_EP_NUM which are the endpoint numbers and are used during enumeration of the device. The TX and RX endpoints must operate in BULK mode.

If operation mode ACM is selected a third endpoint is needed. This must operate in interrupt mode and should be configured in CYGNUM_IO_USB_SLAVE_SERIAL_INTR_EP and CYGNUM_IO_USB_SLAVE_SERIAL_INTR_EP_NUM.

The USB serial device will make its vendor:product ID known to the host. This should be configured with CYGNUM_IO_USB_SLAVE_SERIAL_VENDOR_ID and CYGNUM_IO_USB_SLAVE_SERIAL_PRODUCT_ID. NOTE: The default configurations are not valid for products, but should work for testing.

The USB enumeration also contains text strings to describe the device. This text string can be set with CYGDAT_IO_USB_SLAVE_SERIAL_PRODUCT_STR.

The last configuration option of interest is CYGPKG_IO_USB_SLAVE_SERIAL_EXAMPLES. When true example programs will be built when the eCos tests are built. These are not pass/fail test like other eCos tests, but examples of how the eCos USB serial class can be used.