Serial Port Complete - Latest Microcontroller projects

(lily) #1

Chapter 16


face handles device management and call management. The bInterfaceSubClass
field specifies a communication model. Table 16-1 shows defined values for
bInterfaceSubClass. The bInterfaceProtocol field can specify a protocol sup-
ported by a subclass. Table 16-4 shows defined values for this field.
In the example descriptors, bInterfaceNumber identifies the interface as inter-
face 00h. The bInterfaceClass, bInterfaceSubClass, and bInterfaceProtocol
fields identify the interface as a CDC communication class interface that sup-
ports the abstract control model and common AT commands. To comply with
the specification for the abstract control model, bInterfaceProtocol should be
set to 0x01 (AT commands) even if the device doesn’t communicate with
modems and thus doesn’t receive AT commands.
Following the communication class interface descriptor is a series of class-spe-
cific descriptors consisting of a header functional descriptor followed by one or
more functional descriptors that provide information about a specific commu-
nication function. Table 16-5 contains defined values for the functional
descriptors.
The example descriptors include four functional descriptors.
The header functional descriptor names the release number of the CDC specifi-
cation the device complies with.
The abstract control management functional descriptor contains a bmCapabili-
ties field that identifies which requests and notifications the interface supports
(Table 16-6).
The union functional descriptor defines a relationship among multiple inter-
faces that form a functional unit. The descriptor designates one interface as the
controlling, or master, interface, which can send and receive messages that
apply to the other controlled, or slave, interface(s) in the unit. For example, a
communication class interface can be a controlling interface for a data class
interface that carries virtual-COM-port data. The interfaces in a unit can also
include interfaces that belong to another USB class such as audio or human
interface device (HID).
In the example descriptors, the union functional descriptor names the current
interface as the controlling interface and names interface 01h as the controlled
interface. When the union has multiple controlled interfaces, the additional
interface numbers follow bSlaveInterface0 in the union functional descriptor.
In the call management functional descriptor, the bmCapabilities field is set to
zero to indicate that the device doesn’t handle call management. The
bDataInterface field contains the bInterfaceNumber value for the device’s data
Free download pdf