After sorting and digesting the device model, you have the foundation to compile a device driver program.
You need to be familiar with the driver of the USB device because of the working relationship. Therefore, select the driver of the USB device as the start point.
How can a USB device be discovered by the USB System and installed with the corresponding device driver so that the USB device can work properly?
When a USB device connects to the host through a USB interface, it is actually linked to an interface of a USB Hub (hub, the interface of the hub has a level change (high-speed devices are uplinked to D +, and low-speed devices are uplinked to D +), so that the port has access from the device, in this way, the USB master controller can be notified that a device has been inserted on an interface of the hub. At this time, the USB Host determines what action to take.
Generally, a USB device can be directly connected to the hub or an intermediate hub. A is a USB device connected to the hub, and B is linked to the intermediate hub.
In this case, we first met a USB hub. How the hub discovers the device and how the device works through the hub is the basis for the work of the USB device.