Download uC-USB-Device User`s Manual v4.05 - Doc

Transcript
µC/USB Device User's Manual
Configuration Examples
This section provides examples of configuration for µC/USB-Device stack based on some
typical usages. This section will only give examples of static stack configuration, as the
application-specific configuration greatly depends on your application. Also, the device
configuration is related to your product’s context, and the device controller driver
configuration depends on the hardware you use.
The examples of typical usage that will be treated are the following:
Simple Full-Speed USB Device
This device uses Micrium’s vendor class.
Table - Configuration Example of a Simple Full-Speed USB Device in the Configuration
Examples page shows the values that should be set for the different configuration constants
described earlier if you build a simple full-speed USB device using Micrium’s vendor class.
Configuration
Value
Explanation
USBD_CFG_MAX_NBR_CFG
1
Since the device is full speed, only one configuration is needed.
USBD_CFG_MAX_NBR_IF
1
Since the device only uses the vendor class, only one interface is needed.
USBD_CFG_MAX_NBR_IF_ALT
1
No alternate interfaces are needed, but this value must at least be equal to
USBD_CFG_MAX_NBR_IF.
USBD_CFG_MAX_NBR_IF_GRP
0
No interface association needed.
USBD_CFG_MAX_NBR_EP_DESC
2 or 4
Two bulk endpoints and two optional interrupt endpoints.
USBD_CFG_MAX_NBR_EP_OPEN
4 or 6
Two control endpoints for the device’s standard requests.
Two bulk endpoints and two optional interrupt endpoints.
USBD_VENDOR_CFG_MAX_NBR_DEV
1
Only one instance of vendor class is needed.
USBD_VENDOR_CFG_MAX_NBR_CFG
1
Vendor class instance will only be used in one configuration.
Table - Configuration Example of a Simple Full-Speed USB Device
Composite High-Speed USB Device
This device uses Micrium’s PHDC and MSC classes.
Table - Configuration Example of a Composite High-Speed USB Device in the Configuration
Copyright 2015 Micrium Inc.
79