AN249 Silicon_Laboratories, AN249 Datasheet - Page 30

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
This item tells the host that the following collection contains data pertaining to the characteristics of a Mouse
pointer device.
This item begins the collection of data describing a single data point. In this case, the single data point is the state
of the left mouse button and the relative position of the mouse along the X- and Y-axis.
This item tells the host that the following data should be interpreted as “buttons”, meaning that each bit represents
some indicator that is either in the “On” or “Off” state.
These two items function to give the button in the following data a Usage. If the mouse supported multiple buttons,
then the Usage Maximum would be increased and each button would be assigned a unique Usage.
These two items function to show the lowest and highest possible value of the data that will follow. Since the data
can only take an “On” or “Off” state, the minimum can be set to 0 and the maximum can be set to 1.
These two items tell the host that one data point will follow, and that this data point will take one bit of space. This is
the data bit that will show whether or not the left mouse button has been pressed.
This is the item that describes the data itself. The item tells the host that the data can change and that its value is
absolute (i.e., not relative to any other data or axis).
These two items set up the padding needed to fill in the other bits of the byte containing the data pertaining to the
button. These items refer to 7 1-bit data points.
This item designates the above 7 bits of data to be constant. This will effectively create a byte of data where bit 0
contains information about the left mouse button and bits 2 through 7 are padding.
These items describe the next group of data. The Usage Page is set to Generic Desktop to tell the host that the
following data will be relevant to system software. The next two usages tell the host that the Generic Desktop data
to follow pertain to X- and Y-axis information controlled by the system. This usage definition informs the host that
the following data will be formatted such that the data pertaining to the X-axis will be transferred before data
pertaining to the Y-axis.
30
0xA1, 0x00, // Collection (Physical)
0x05, 0x09, // Usage Page (Buttons)
0x19, 0x01, // Usage Minimum (01)
0x29, 0x01, // Usage Maximum (01)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x95, 0x01, // Report Count (1)
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data, Variable, Absolute)
0x95, 0x01, // Report Count (1)
0x75, 0x07, // Report Size (7)
0x81, 0x01, // Input (Constant) for padding
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
0x15, 0x81, // Logical Minimum (–127)
Rev. 0.2

Related parts for AN249