AN249 Silicon_Laboratories, AN249 Datasheet - Page 6

no-image

AN249

Manufacturer Part Number
AN249
Description
Human Interface Device Tutorial
Manufacturer
Silicon_Laboratories
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2490NFHP
Manufacturer:
PANASONIC/松下
Quantity:
20 000
Part Number:
AN2491NFHP
Manufacturer:
PANASON
Quantity:
5 510
Part Number:
AN2491NFHP
Manufacturer:
MAXIM
Quantity:
5 510
AN249
4.1.2. Descriptor Definition Example
The definition might look like the following:
const code device_descriptor DeviceDesc =
{
}; //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
18,
0x01,
0x1001,
0x00,
0x00,
0x00,
EP0_PACKET_SIZE,
0xC410,
0x0001,
0x0000,
0x01,
0x02,
0x00,
0x01
// bLength
// bDescriptorType
// bcdUSB
// bDeviceClass
// bDeviceSubClass
// bDeviceProtocol
// bMaxPacketSize0
// idVendor
// idProduct
// bcdDevice
// iManufacturer
// iProduct
// iSerialNumber
// bNumConfigurations
Rev. 0.2

Related parts for AN249