DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

AN249 데이터 시트보기 (PDF) - Silicon Laboratories

부품명
상세내역
제조사
AN249
Silabs
Silicon Laboratories Silabs
AN249 Datasheet PDF : 42 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
AN249
4.1.2. Descriptor Definition Example
The definition might look like the following:
const code device_descriptor DeviceDesc =
{
18,
// bLength
0x01,
// bDescriptorType
0x1001,
// bcdUSB
0x00,
// bDeviceClass
0x00,
// bDeviceSubClass
0x00,
// bDeviceProtocol
EP0_PACKET_SIZE,
// bMaxPacketSize0
0xC410,
// idVendor
0x0001,
// idProduct
0x0000,
// bcdDevice
0x01,
// iManufacturer
0x02,
// iProduct
0x00,
// iSerialNumber
0x01
// bNumConfigurations
}; //end of DeviceDesc
The definition exactly follows the declaration for the struct device_descriptor. All contents in this definition
must be valid at the firmware system’s compile time because all of these values will be stored in nonvolatile
memory. Descriptor values stored in multiple bytes must follow the "little endian" style of formatting, where the least
significant byte is stored first. For example, a value of 300 or 0x012C, would be stored as 0x2C01.
4.1.3. A Reminder About Descriptors
Many HID devices have very similar descriptor contents, and in many cases, the descriptors defined in the
firmware template will need to be changed in only a few places to create a customized HID-class device that suits
the needs of a given application. For detailed discussions on each descriptor’s contents, read the sections of this
document describing the firmware template and the two examples created by modifying the template.
4.2. Device Responsibilities During Enumeration
A device’s main responsibility during enumeration is to respond to requests for information made by the host
system in a timely and accurate manner. The device transfers all enumeration data across the control endpoint. In
the firmware template, this endpoint is handled during execution of the USB ISR.
6
Rev. 0.2

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]