hidapi.h: adjust so that it gives a smaller diff against mainstream
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
diff --git a/src/hidapi/hidapi/hidapi.h b/src/hidapi/hidapi/hidapi.h
index 2c66319..1896a38 100644
--- a/src/hidapi/hidapi/hidapi.h
+++ b/src/hidapi/hidapi/hidapi.h
@@ -77,9 +77,11 @@ namespace NAMESPACE {
(Windows/Mac only).*/
unsigned short usage;
/** The USB interface which this logical device
- represents. Valid on both Linux implementations
- in all cases, and valid on the Windows implementation
- only if the device contains more than one interface. */
+ represents.
+
+ * Valid on both Linux implementations in all cases.
+ * Valid on the Windows implementation only if the device
+ contains more than one interface. */
int interface_number;
/** Additional information about the USB interface.
@@ -101,7 +103,7 @@ namespace NAMESPACE {
needed. This function should be called at the beginning of
execution however, if there is a chance of HIDAPI handles
being opened by different threads simultaneously.
-
+
@ingroup API
@returns
@@ -139,7 +141,7 @@ namespace NAMESPACE {
@returns
This function returns a pointer to a linked list of type
- struct #hid_device, containing information about the HID devices
+ struct #hid_device_info, containing information about the HID devices
attached to the system, or NULL in the case of failure. Free
this linked list by calling hid_free_enumeration().
*/
@@ -205,7 +207,7 @@ namespace NAMESPACE {
the Control Endpoint (Endpoint 0).
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param data The data to send, including the report number as
the first byte.
@param length The length in bytes of the data to send.
@@ -214,7 +216,7 @@ namespace NAMESPACE {
This function returns the actual number of bytes written and
-1 on error.
*/
- int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length);
+ int HID_API_EXPORT HID_API_CALL hid_write(hid_device *dev, const unsigned char *data, size_t length);
/** @brief Read an Input report from a HID device with timeout.
@@ -223,7 +225,7 @@ namespace NAMESPACE {
contain the Report number if the device uses numbered reports.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param data A buffer to put the read data into.
@param length The number of bytes to read. For devices with
multiple reports, make sure to read an extra byte for
@@ -235,7 +237,7 @@ namespace NAMESPACE {
-1 on error. If no packet was available to be read within
the timeout period, this function returns 0.
*/
- int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds);
+ int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char *data, size_t length, int milliseconds);
/** @brief Read an Input report from a HID device.
@@ -244,7 +246,7 @@ namespace NAMESPACE {
contain the Report number if the device uses numbered reports.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param data A buffer to put the read data into.
@param length The number of bytes to read. For devices with
multiple reports, make sure to read an extra byte for
@@ -255,7 +257,7 @@ namespace NAMESPACE {
-1 on error. If no packet was available to be read and
the handle is in non-blocking mode, this function returns 0.
*/
- int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length);
+ int HID_API_EXPORT HID_API_CALL hid_read(hid_device *dev, unsigned char *data, size_t length);
/** @brief Set the device handle to be non-blocking.
@@ -267,7 +269,7 @@ namespace NAMESPACE {
Nonblocking can be turned on and off at any time.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param nonblock enable or not the nonblocking reads
- 1 to enable nonblocking
- 0 to disable nonblocking.
@@ -275,7 +277,7 @@ namespace NAMESPACE {
@returns
This function returns 0 on success and -1 on error.
*/
- int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *device, int nonblock);
+ int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *dev, int nonblock);
/** @brief Send a Feature report to the device.
@@ -293,7 +295,7 @@ namespace NAMESPACE {
in would be 17.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param data The data to send, including the report number as
the first byte.
@param length The length in bytes of the data to send, including
@@ -303,7 +305,7 @@ namespace NAMESPACE {
This function returns the actual number of bytes written and
-1 on error.
*/
- int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *device, const unsigned char *data, size_t length);
+ int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *dev, const unsigned char *data, size_t length);
/** @brief Get a feature report from a HID device.
@@ -314,7 +316,7 @@ namespace NAMESPACE {
start in data[1].
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param data A buffer to put the read data into, including
the Report ID. Set the first byte of @p data[] to the
Report ID of the report to be read, or set it to zero
@@ -328,55 +330,55 @@ namespace NAMESPACE {
one for the report ID (which is still in the first
byte), or -1 on error.
*/
- int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *device, unsigned char *data, size_t length);
+ int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *dev, unsigned char *data, size_t length);
/** @brief Close a HID device.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
*/
- void HID_API_EXPORT HID_API_CALL hid_close(hid_device *device);
+ void HID_API_EXPORT HID_API_CALL hid_close(hid_device *dev);
/** @brief Get The Manufacturer String from a HID device.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@returns
This function returns 0 on success and -1 on error.
*/
- int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *device, wchar_t *string, size_t maxlen);
+ int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *dev, wchar_t *string, size_t maxlen);
/** @brief Get The Product String from a HID device.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@returns
This function returns 0 on success and -1 on error.
*/
- int HID_API_EXPORT_CALL hid_get_product_string(hid_device *device, wchar_t *string, size_t maxlen);
+ int HID_API_EXPORT_CALL hid_get_product_string(hid_device *dev, wchar_t *string, size_t maxlen);
/** @brief Get The Serial Number String from a HID device.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@returns
This function returns 0 on success and -1 on error.
*/
- int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *device, wchar_t *string, size_t maxlen);
+ int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *dev, wchar_t *string, size_t maxlen);
/** @brief Get a string from a HID device, based on its string index.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@param string_index The index of the string to get.
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@@ -384,18 +386,18 @@ namespace NAMESPACE {
@returns
This function returns 0 on success and -1 on error.
*/
- int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *device, int string_index, wchar_t *string, size_t maxlen);
+ int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
/** @brief Get a string describing the last error which occurred.
@ingroup API
- @param device A device handle returned from hid_open().
+ @param dev A device handle returned from hid_open().
@returns
This function returns a string containing the last error
which occurred or NULL if none has occurred.
*/
- HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *device);
+ HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *dev);
#if defined(__cplusplus) && !defined(NAMESPACE)
}