USB device type

Source: Internet
Author: User

When designing a USB device, first determine the category of the device, and then implement the Basic USB communication protocol and the category communication protocol of the device. For example, the USB flash disk belongs to the mass storage device. Therefore, in addition to the basic USB communication protocol, the UFI command specification in the large-capacity storage equipment specification must be implemented. Because Windows supports the mass storage protocol, the USB flash disk only needs to follow the mass storage protocol to organize data and process commands to exchange data with PCs.

The USB specification defines many device types, which are represented by different device category codes and interface category codes. The hid (Human Interface Device, Human Interface Device) device category code is 0x00, the interface category code is 0x03. The hid devices include keyboards, mice, and game poles. The mass storage device category code is also 0x00, the interface category code is 0x09. Mass Storage devices include floppy disks, hard disks, CDs, and flash disks. Others include displays, communication devices, and audio devices. In the USB specification, there is also a special Vendor Specific Class device, which is used by the vendor to customize the device type. Its Interface category code is 0xff. We can find a suitable device type.

The device mainly collects data and transmits the collected data to the PC end for processing. I will not detail the hardware implementation. This article focuses on the implementation of the lower computer software. Select the hid class for the device type, because this class does not require drivers. Windows comes with some common drivers. We only need to write firmware programs for communication, you can call the hid APIs to receive data. I will not use the upper computer here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.