Serial Port Complete - Latest Microcontroller projects

(lily) #1
Using Generic USB Controllers

descriptor from a device, the device returns the lesser of wTotalLength bytes
and the number of bytes requested.


   
3 
$   


The first interface descriptor in the example is the communication class inter-
face descriptor. Every CDC device must have an interface descriptor with
bInterfaceClass = 02h to indicate a communication class interface. This inter-

    
 
bLength 0x07 Descriptor size in bytes (7)
bDescriptorType 0x05 Descriptor type (ENDPOINT)
bEndpointAddress 0x01 Endpoint number and direction (1 OUT)
bmAttributes 0x02 Transfer type (bulk)
wMaxPacketSize 0x0040 Maximum packet size (64)
bInterval 0x00 Maximum latency/high-speed OUT NAK rate
(doesn't apply to full-speed bulk endpoints)


 
4
%


"(
0x04 Descriptor size in bytes (4)
0x03 Descriptor type (STRING)
0x0409 Language ID (U.S. English)


 
<
%  

(
0x2C Descriptor size in bytes (44)
0x03 Descriptor type (STRING)
“Lakeview Research LLC” (String contents, 2 bytes per character)


 
)
% 

(
0x20 Descriptor size in bytes (32)
0x03 Descriptor type (STRING)
“COM Port Device” (String contents, 2 bytes per character)


 
/
%
 (
0x1A Descriptor size in bytes (26)
0x03 Descriptor type (STRING)
“123456789ABC” (String contents, 2 bytes per character)

Table 16-3: Example descriptors for a full-speed CDC device (Sheet 4 of 4).

Free download pdf