You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Extracting and setting control data by data indices
50
-
51
-
To use data indices to extract and set control data in a HID report, an application or driver can use the following [HIDClass support routines](/windows-hardware/drivers/ddi/_hid/#hidclass-support-routines):
These routines are useful to an application or driver that provides a "value-added" service. For example, one that provides a custom interface to all the controls supported by a HIDClass device. Microsoft DirectInput is one example.
57
-
58
-
An application or driver calling these routines can most efficiently obtain and set all values in a report. For example, to obtain all value data by their [HID usages](./hid-usages.md) it has to call [HidP_GetUsageValue](/windows-hardware/drivers/ddi/hidpi/nf-hidpi-hidp_getusagevalue) for each usage. However, to obtain all value data by data index, it only has to call **HidP_GetData** once.
59
-
60
-
An application or driver uses the data indices specified in a collection's [Button Capability Arrays](./button-capability-arrays.md) and [Value Capability Arrays](./value-capability-arrays.md) to identify HID usages.
61
-
62
49
## Setting value data by specifying its usage
63
50
64
51
An application or driver can set a value in a properly initialized HID report by calling one of the following HID support routines:
@@ -74,7 +61,7 @@ An application or driver can set the state of buttons in a properly initialized
74
61
-[HidP_SetButtons](/windows-hardware/drivers/ddi/hidpi/#hidp_setbuttons) (or [HidP_SetUsages](/windows-hardware/drivers/ddi/hidpi/nf-hidpi-hidp_setusages)) Sets a specified set of buttons to ON (1).
75
62
-[HidP_UnsetButtons](/windows-hardware/drivers/ddi/hidpi/#hidp_unsetbuttons) (or [HidP_UnsetUsages](/windows-hardware/drivers/ddi/hidpi/nf-hidpi-hidp_unsetusages)) Sets a specified set of buttons to OFF (zero).
76
63
77
-
## Extracting and setting HID control data by data indices
64
+
## Extracting and setting control data by data indices
78
65
79
66
To use data indices to extract and set control data in a HID report, an application or driver can use the following [HIDClass support routines](/windows-hardware/drivers/ddi/_hid/#hidclass-support-routines):
80
67
@@ -83,7 +70,7 @@ To use data indices to extract and set control data in a HID report, an applicat
83
70
84
71
These routines are useful to an application or driver that provides a "value-added" service. For example, one that provides a custom interface to all the controls supported by a HIDClass device. Microsoft DirectInput is one example.
85
72
86
-
An application or driver calling these routines can most efficiently obtain and set all values in a report. For example, to obtain all value data by their HID usages, it has to call [HidP_GetUsageValue](/windows-hardware/drivers/ddi/hidpi/nf-hidpi-hidp_getusagevalue) for each usage. However, to obtain all value data by data index, it only has to call **HidP_GetData** once.
73
+
An application or driver calling these routines can most efficiently obtain and set all values in a report. For example, to obtain all value data by their [HID usages](./hid-usages.md) it has to call [HidP_GetUsageValue](/windows-hardware/drivers/ddi/hidpi/nf-hidpi-hidp_getusagevalue) for each usage. However, to obtain all value data by data index, it only has to call **HidP_GetData** once.
87
74
88
75
An application or driver uses the data indices specified in a collection's [Button Capability Arrays](./button-capability-arrays.md) and [Value Capability Arrays](./value-capability-arrays.md) to identify HID usages.
0 commit comments