Address: http://justmei.blog.163.com/blog/static/1160998532010321112522467/
What is the CDC class (communication device class)
Usb cdc class is short for USB communication device class. The CDC category is a type of USB subclass defined by the USB organization for various communication devices (telecom communication devices and medium-speed network communication devices. According to the communication settings of the CDC category, the CDC category is divided into the following different models: USB traditional pure telephone service (POTS) model, usb isdn model and USB network model. Among them, the traditional USB pure phone business model can be divided into direct line control model and abstract control model) and USB telephone model, as shown in figure 1. The virtual serial port discussed in this article belongs to the abstract control model under the USB traditional pure telephone business model.
Generally, a CDC class consists of two subinterfaces: the communication interface class and the data interface class (DA ).Ta interface class ). The author manages and controls the device through the communication interface class, and transmits data through the data interface class. These two interface subclasses occupy different numbers and types of endpoints, as shown in figure 2. For the different CDC models described above, the terminal point requirements for the corresponding interfaces are also different. For example, if the abstract control model needs to be discussed for terminal points, the communication interface class requires a control endpoint and an optional interrupt terminal point, the data interface subclass requires a periodic (isochronous) terminal point whose direction is input (in) and a periodic terminal point whose direction is output (out. The control terminal points are mainly used for enumeration of USB devices and communication between the baud rate and data type (Data bit, stop bit, and start bit) of virtual serial ports. The non-synchronous terminal point in the output direction is used for the host to send data to the slave device (slave), which is equivalent to the txd line in the traditional physical serial port (from the perspective of the microcontroller ), the non-synchronous terminal point sent by the input party is used to send data from the device to the host, which is equivalent to the rxd line in the traditional physical serial port.