@@ -195,7 +195,7 @@ extern "C" {
195
195
the Control Endpoint (Endpoint 0).
196
196
197
197
@ingroup API
198
- @param device A device handle returned from hid_open().
198
+ @param dev A device handle returned from hid_open().
199
199
@param data The data to send, including the report number as
200
200
the first byte.
201
201
@param length The length in bytes of the data to send.
@@ -204,7 +204,7 @@ extern "C" {
204
204
This function returns the actual number of bytes written and
205
205
-1 on error.
206
206
*/
207
- int HID_API_EXPORT HID_API_CALL hid_write (hid_device * device , const unsigned char * data , size_t length );
207
+ int HID_API_EXPORT HID_API_CALL hid_write (hid_device * dev , const unsigned char * data , size_t length );
208
208
209
209
/** @brief Read an Input report from a HID device with timeout.
210
210
@@ -213,7 +213,7 @@ extern "C" {
213
213
contain the Report number if the device uses numbered reports.
214
214
215
215
@ingroup API
216
- @param device A device handle returned from hid_open().
216
+ @param dev A device handle returned from hid_open().
217
217
@param data A buffer to put the read data into.
218
218
@param length The number of bytes to read. For devices with
219
219
multiple reports, make sure to read an extra byte for
@@ -234,7 +234,7 @@ extern "C" {
234
234
contain the Report number if the device uses numbered reports.
235
235
236
236
@ingroup API
237
- @param device A device handle returned from hid_open().
237
+ @param dev A device handle returned from hid_open().
238
238
@param data A buffer to put the read data into.
239
239
@param length The number of bytes to read. For devices with
240
240
multiple reports, make sure to read an extra byte for
@@ -245,7 +245,7 @@ extern "C" {
245
245
-1 on error. If no packet was available to be read and
246
246
the handle is in non-blocking mode, this function returns 0.
247
247
*/
248
- int HID_API_EXPORT HID_API_CALL hid_read (hid_device * device , unsigned char * data , size_t length );
248
+ int HID_API_EXPORT HID_API_CALL hid_read (hid_device * dev , unsigned char * data , size_t length );
249
249
250
250
/** @brief Set the device handle to be non-blocking.
251
251
@@ -257,15 +257,15 @@ extern "C" {
257
257
Nonblocking can be turned on and off at any time.
258
258
259
259
@ingroup API
260
- @param device A device handle returned from hid_open().
260
+ @param dev A device handle returned from hid_open().
261
261
@param nonblock enable or not the nonblocking reads
262
262
- 1 to enable nonblocking
263
263
- 0 to disable nonblocking.
264
264
265
265
@returns
266
266
This function returns 0 on success and -1 on error.
267
267
*/
268
- int HID_API_EXPORT HID_API_CALL hid_set_nonblocking (hid_device * device , int nonblock );
268
+ int HID_API_EXPORT HID_API_CALL hid_set_nonblocking (hid_device * dev , int nonblock );
269
269
270
270
/** @brief Send a Feature report to the device.
271
271
@@ -283,7 +283,7 @@ extern "C" {
283
283
in would be 17.
284
284
285
285
@ingroup API
286
- @param device A device handle returned from hid_open().
286
+ @param dev A device handle returned from hid_open().
287
287
@param data The data to send, including the report number as
288
288
the first byte.
289
289
@param length The length in bytes of the data to send, including
@@ -293,7 +293,7 @@ extern "C" {
293
293
This function returns the actual number of bytes written and
294
294
-1 on error.
295
295
*/
296
- int HID_API_EXPORT HID_API_CALL hid_send_feature_report (hid_device * device , const unsigned char * data , size_t length );
296
+ int HID_API_EXPORT HID_API_CALL hid_send_feature_report (hid_device * dev , const unsigned char * data , size_t length );
297
297
298
298
/** @brief Get a feature report from a HID device.
299
299
@@ -304,7 +304,7 @@ extern "C" {
304
304
start in data[1].
305
305
306
306
@ingroup API
307
- @param device A device handle returned from hid_open().
307
+ @param dev A device handle returned from hid_open().
308
308
@param data A buffer to put the read data into, including
309
309
the Report ID. Set the first byte of @p data[] to the
310
310
Report ID of the report to be read, or set it to zero
@@ -318,74 +318,74 @@ extern "C" {
318
318
one for the report ID (which is still in the first
319
319
byte), or -1 on error.
320
320
*/
321
- int HID_API_EXPORT HID_API_CALL hid_get_feature_report (hid_device * device , unsigned char * data , size_t length );
321
+ int HID_API_EXPORT HID_API_CALL hid_get_feature_report (hid_device * dev , unsigned char * data , size_t length );
322
322
323
323
/** @brief Close a HID device.
324
324
325
325
@ingroup API
326
- @param device A device handle returned from hid_open().
326
+ @param dev A device handle returned from hid_open().
327
327
*/
328
- void HID_API_EXPORT HID_API_CALL hid_close (hid_device * device );
328
+ void HID_API_EXPORT HID_API_CALL hid_close (hid_device * dev );
329
329
330
330
/** @brief Get The Manufacturer String from a HID device.
331
331
332
332
@ingroup API
333
- @param device A device handle returned from hid_open().
333
+ @param dev A device handle returned from hid_open().
334
334
@param string A wide string buffer to put the data into.
335
335
@param maxlen The length of the buffer in multiples of wchar_t.
336
336
337
337
@returns
338
338
This function returns 0 on success and -1 on error.
339
339
*/
340
- int HID_API_EXPORT_CALL hid_get_manufacturer_string (hid_device * device , wchar_t * string , size_t maxlen );
340
+ int HID_API_EXPORT_CALL hid_get_manufacturer_string (hid_device * dev , wchar_t * string , size_t maxlen );
341
341
342
342
/** @brief Get The Product String from a HID device.
343
343
344
344
@ingroup API
345
- @param device A device handle returned from hid_open().
345
+ @param dev A device handle returned from hid_open().
346
346
@param string A wide string buffer to put the data into.
347
347
@param maxlen The length of the buffer in multiples of wchar_t.
348
348
349
349
@returns
350
350
This function returns 0 on success and -1 on error.
351
351
*/
352
- int HID_API_EXPORT_CALL hid_get_product_string (hid_device * device , wchar_t * string , size_t maxlen );
352
+ int HID_API_EXPORT_CALL hid_get_product_string (hid_device * dev , wchar_t * string , size_t maxlen );
353
353
354
354
/** @brief Get The Serial Number String from a HID device.
355
355
356
356
@ingroup API
357
- @param device A device handle returned from hid_open().
357
+ @param dev A device handle returned from hid_open().
358
358
@param string A wide string buffer to put the data into.
359
359
@param maxlen The length of the buffer in multiples of wchar_t.
360
360
361
361
@returns
362
362
This function returns 0 on success and -1 on error.
363
363
*/
364
- int HID_API_EXPORT_CALL hid_get_serial_number_string (hid_device * device , wchar_t * string , size_t maxlen );
364
+ int HID_API_EXPORT_CALL hid_get_serial_number_string (hid_device * dev , wchar_t * string , size_t maxlen );
365
365
366
366
/** @brief Get a string from a HID device, based on its string index.
367
367
368
368
@ingroup API
369
- @param device A device handle returned from hid_open().
369
+ @param dev A device handle returned from hid_open().
370
370
@param string_index The index of the string to get.
371
371
@param string A wide string buffer to put the data into.
372
372
@param maxlen The length of the buffer in multiples of wchar_t.
373
373
374
374
@returns
375
375
This function returns 0 on success and -1 on error.
376
376
*/
377
- int HID_API_EXPORT_CALL hid_get_indexed_string (hid_device * device , int string_index , wchar_t * string , size_t maxlen );
377
+ int HID_API_EXPORT_CALL hid_get_indexed_string (hid_device * dev , int string_index , wchar_t * string , size_t maxlen );
378
378
379
379
/** @brief Get a string describing the last error which occurred.
380
380
381
381
@ingroup API
382
- @param device A device handle returned from hid_open().
382
+ @param dev A device handle returned from hid_open().
383
383
384
384
@returns
385
385
This function returns a string containing the last error
386
386
which occurred or NULL if none has occurred.
387
387
*/
388
- HID_API_EXPORT const wchar_t * HID_API_CALL hid_error (hid_device * device );
388
+ HID_API_EXPORT const wchar_t * HID_API_CALL hid_error (hid_device * dev );
389
389
390
390
#ifdef __cplusplus
391
391
}
0 commit comments